qemu-devel
[Top][All Lists]
Advanced

[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: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 2/2] block: untangle open flag manipulation in bdrv_open2
Date: Tue, 12 Jan 2010 18:32:13 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-3.fc11 Thunderbird/3.0

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.

Maybe except if we want to support protocols with bdrv_create, so we
would go for the block layer functions rather than the POSIX functions.
However, I don't think there is a need to do so.

Kevin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]