From: Jeff Cody <jcody@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH for-2.10 3/5] block: Set BDRV_O_ALLOW_RDWR during rw reopen
Date: Thu, 3 Aug 2017 12:24:29 -0400 [thread overview]
Message-ID: <20170803162429.GG22129@localhost.localdomain> (raw)
In-Reply-To: <20170803150301.10177-4-kwolf@redhat.com>
On Thu, Aug 03, 2017 at 05:02:59PM +0200, Kevin Wolf wrote:
> Reopening an image should be consistent with opening it, so we should
> set BDRV_O_ALLOW_RDWR for any image that is reopened read-write like in
> bdrv_open_inherit().
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> block.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/block.c b/block.c
> index 2711c3dd3b..3615a6809e 100644
> --- a/block.c
> +++ b/block.c
> @@ -2729,8 +2729,11 @@ static BlockReopenQueue *bdrv_reopen_queue_child(BlockReopenQueue *bs_queue,
> bdrv_join_options(bs, options, old_options);
> QDECREF(old_options);
>
> - /* bdrv_open() masks this flag out */
> + /* bdrv_open_inherit() sets and clears some additional flags internally */
> flags &= ~BDRV_O_PROTOCOL;
> + if (flags & BDRV_O_RDWR) {
> + flags |= BDRV_O_ALLOW_RDWR;
> + }
>
> QLIST_FOREACH(child, &bs->children, next) {
> QDict *new_child_options;
> --
> 2.13.3
>
>
Reviewed-by: Jeff Cody <jcody@redhat.com>
next prev parent reply other threads:[~2017-08-03 16:24 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-03 15:02 [Qemu-devel] [PATCH for-2.10 0/5] block: bdrv_reopen() fixes Kevin Wolf
2017-08-03 15:02 ` [Qemu-devel] [PATCH for-2.10 1/5] block: Fix order in bdrv_replace_child() Kevin Wolf
2017-08-03 15:12 ` Eric Blake
2017-08-03 16:18 ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-08-03 15:02 ` [Qemu-devel] [PATCH for-2.10 2/5] block: Allow reopen rw without BDRV_O_ALLOW_RDWR Kevin Wolf
2017-08-03 15:21 ` Eric Blake
2017-08-04 1:49 ` Eric Blake
2017-08-04 10:20 ` Kevin Wolf
2017-08-04 11:17 ` Eric Blake
2017-08-03 16:22 ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-08-03 15:02 ` [Qemu-devel] [PATCH for-2.10 3/5] block: Set BDRV_O_ALLOW_RDWR during rw reopen Kevin Wolf
2017-08-03 15:27 ` Eric Blake
2017-08-03 16:24 ` Jeff Cody [this message]
2017-08-03 15:03 ` [Qemu-devel] [PATCH for-2.10 4/5] qemu-io: Allow reopen read-write Kevin Wolf
2017-08-03 15:37 ` Eric Blake
2017-08-03 16:25 ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-08-03 15:03 ` [Qemu-devel] [PATCH for-2.10 5/5] qemu-iotests: Test reopen between read-only and read-write Kevin Wolf
2017-08-03 15:41 ` Eric Blake
2017-08-03 16:28 ` [Qemu-devel] [Qemu-block] " Jeff Cody
2017-08-07 23:39 ` [Qemu-devel] [Qemu-block] [PATCH for-2.10 0/5] block: bdrv_reopen() fixes John Snow
2017-08-08 7:37 ` [Qemu-devel] " Kevin Wolf
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=20170803162429.GG22129@localhost.localdomain \
--to=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).