From: Kevin Wolf <kwolf@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] block: untangle open flag manipulation in bdrv_open2
Date: Tue, 12 Jan 2010 18:32:13 +0100 [thread overview]
Message-ID: <4B4CB21D.30108@redhat.com> (raw)
In-Reply-To: <20100111175209.GB7571@lst.de>
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 <hch@lst.de>
Nice cleanup.
Acked-by: Kevin Wolf <kwolf@redhat.com>
> + /*
> + * 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
next prev parent reply other threads:[~2010-01-12 17:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-11 17:52 [Qemu-devel] [PATCH 2/2] block: untangle open flag manipulation in bdrv_open2 Christoph Hellwig
2010-01-12 17:32 ` Kevin Wolf [this message]
2010-01-12 17:37 ` Christoph Hellwig
2010-01-19 21:00 ` [Qemu-devel] PATCH 3/2] block: kill BDRV_O_CREAT Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B4CB21D.30108@redhat.com \
--to=kwolf@redhat.com \
--cc=hch@lst.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.