[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] block: untangle open flag manipulation in b
From: |
Christoph Hellwig |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] block: untangle open flag manipulation in bdrv_open2 |
Date: |
Tue, 12 Jan 2010 18:37:14 +0100 |
User-agent: |
Mutt/1.3.28i |
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 <address@hidden>
>
> Nice cleanup.
>
> Acked-by: Kevin Wolf <address@hidden>
>
> > + /*
> > + * 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.