From patchwork Wed Apr 7 11:58:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 49602 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AADBAB7D0C for ; Wed, 7 Apr 2010 22:03:41 +1000 (EST) Received: from localhost ([127.0.0.1]:58800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NzTyt-0002pH-2E for incoming@patchwork.ozlabs.org; Wed, 07 Apr 2010 08:03:39 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NzTte-0001fr-9i for qemu-devel@nongnu.org; Wed, 07 Apr 2010 07:58:14 -0400 Received: from [140.186.70.92] (port=50194 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NzTtZ-0001f5-AF for qemu-devel@nongnu.org; Wed, 07 Apr 2010 07:58:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NzTtX-0007mE-MC for qemu-devel@nongnu.org; Wed, 07 Apr 2010 07:58:09 -0400 Received: from verein.lst.de ([213.95.11.210]:34894) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NzTtX-0007lt-4J for qemu-devel@nongnu.org; Wed, 07 Apr 2010 07:58:07 -0400 Received: from verein.lst.de (localhost [127.0.0.1]) by verein.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id o37Bw6WY012553 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 7 Apr 2010 13:58:06 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-7.2) id o37Bw6DH012552 for qemu-devel@nongnu.org; Wed, 7 Apr 2010 13:58:06 +0200 Date: Wed, 7 Apr 2010 13:58:06 +0200 From: Christoph Hellwig To: qemu-devel@nongnu.org Message-ID: <20100407115806.GC12452@lst.de> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH] raw-posix: don't assign bs->read_only X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org bdrv_open already takes care of this for us. Signed-off-by: Christoph Hellwig Acked-by: Kevin Wolf Index: qemu/block/raw-posix.c =================================================================== --- qemu.orig/block/raw-posix.c 2010-04-07 13:50:16.573261199 +0200 +++ qemu/block/raw-posix.c 2010-04-07 13:50:25.180005926 +0200 @@ -142,7 +142,6 @@ static int raw_open_common(BlockDriverSt s->open_flags |= O_RDWR; } else { s->open_flags |= O_RDONLY; - bs->read_only = 1; } /* Use O_DSYNC for write-through caching, no flags for write-back caching,