From: Jan Kiszka <jan.kiszka@web.de>
To: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Cc: Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PULL 16/31] block: Fix open_flags in bdrv_reopen()
Date: Sun, 04 May 2014 12:13:23 +0200 [thread overview]
Message-ID: <536612C3.5000203@web.de> (raw)
In-Reply-To: <1398882243-14783-17-git-send-email-kwolf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]
On 2014-04-30 20:23, Kevin Wolf wrote:
> Use the same function as bdrv_open() for determining what the right
> flags for bs->file are. Without doing this, a reopen means that
> bs->file loses BDRV_O_CACHE_WB or BDRV_O_UNMAP if bs doesn't have it as
> well.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> Reviewed-by: Max Reitz <mreitz@redhat.com>
> ---
> block.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/block.c b/block.c
> index 9f6f07e..b749d31 100644
> --- a/block.c
> +++ b/block.c
> @@ -1525,8 +1525,11 @@ BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue *bs_queue,
> QSIMPLEQ_INIT(bs_queue);
> }
>
> + /* bdrv_open() masks this flag out */
> + flags &= ~BDRV_O_PROTOCOL;
> +
> if (bs->file) {
> - bdrv_reopen_queue(bs_queue, bs->file, flags);
> + bdrv_reopen_queue(bs_queue, bs->file, bdrv_inherited_flags(flags));
> }
>
> bs_entry = g_new0(BlockReopenQueueEntry, 1);
>
This breaks the "commit" monitor command for disks in snapshot mode.
Returned error is "no permission" (I assume -EPERM).
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
next prev parent reply other threads:[~2014-05-04 10:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1398882243-14783-1-git-send-email-kwolf@redhat.com>
2014-05-02 10:34 ` [Qemu-devel] [PULL 00/31] Block patches Peter Maydell
[not found] ` <1398882243-14783-17-git-send-email-kwolf@redhat.com>
2014-05-04 10:13 ` Jan Kiszka [this message]
[not found] ` <1398882243-14783-29-git-send-email-kwolf@redhat.com>
2014-05-06 9:44 ` [Qemu-devel] [PULL 28/31] curl: Remove unnecessary explicit calls to internal event handler Laurent Desnogues
2014-05-06 9:56 ` Kevin Wolf
2014-05-06 12:41 ` Matthew Booth
2014-05-06 13:12 ` 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=536612C3.5000203@web.de \
--to=jan.kiszka@web.de \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--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.