From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUkgH-0000pj-Ap for qemu-devel@nongnu.org; Tue, 12 Jan 2010 12:37:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUkgC-0000jK-Jz for qemu-devel@nongnu.org; Tue, 12 Jan 2010 12:37:25 -0500 Received: from [199.232.76.173] (port=41771 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUkgC-0000jH-HD for qemu-devel@nongnu.org; Tue, 12 Jan 2010 12:37:20 -0500 Received: from verein.lst.de ([213.95.11.210]:51954) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1NUkgB-00026W-Tj for qemu-devel@nongnu.org; Tue, 12 Jan 2010 12:37:20 -0500 Date: Tue, 12 Jan 2010 18:37:14 +0100 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH 2/2] block: untangle open flag manipulation in bdrv_open2 Message-ID: <20100112173714.GA400@lst.de> References: <20100111175209.GB7571@lst.de> <4B4CB21D.30108@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B4CB21D.30108@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Christoph Hellwig , qemu-devel@nongnu.org On Tue, Jan 12, 2010 at 06:32:13PM +0100, Kevin Wolf wrote: > Am 11.01.2010 18:52, schrieb Christoph Hellwig: > > Untangle the open flag manipulation in bdrv_open2 and document why we > > are clearing the various flags in the different flag combinations. > > > > > > Signed-off-by: Christoph Hellwig > > Nice cleanup. > > Acked-by: Kevin Wolf > > > + /* > > + * Currently BDRV_O_CREAT is not supported by any image format, > > + * but I'm not sure that's reason enough to always clear it for > > + * the !BDRV_O_FILE case.. > > + */ > > + open_flags &= ~(BDRV_O_CREAT); > > Is there even a theoretical use case for this flag? When you want to > create an image, you use bdrv_create. I'd suggest another patch to > remove BDRV_O_CREAT entirely. Sounds good. Currently the only user of it is qemu-io. I tried to look up the history of it but with all the renamings of the block files I haven't managed to find what it used to be for.