qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Alberto Garcia <berto@igalia.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	qemu-stable@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] commit: reopen overlay_bs before base
Date: Fri, 30 Oct 2015 20:14:33 +0100	[thread overview]
Message-ID: <5633C199.8030209@redhat.com> (raw)
In-Reply-To: <7c4f92e0632546aa3ff29b97af11db16f753c06a.1446039123.git.berto@igalia.com>

[-- Attachment #1: Type: text/plain, Size: 1198 bytes --]

On 28.10.2015 14:43, Alberto Garcia wrote:
> 'block-commit' needs write access to two different nodes of the chain:
> 
> - 'base', because that's where the data is written to.
> - the overlay of 'top', because it needs to update the backing file
>   string to point to 'base' after the operation.
> 
> Both images have to be opened in read-write mode, and commit_start()
> takes care of reopening them if necessary.
> 
> With the current implementation, however, when overlay_bs is reopened
> in read-write mode it has the side effect of making 'base' read-only
> again, eventually making 'block-commit' fail.
> 
> This needs to be fixed in bdrv_reopen(), but until we get to that it
> can be worked around simply by swapping the order of base and
> overlay_bs in the reopen queue.
> 
> In order to reproduce this bug, overlay_bs needs to be initially in
> read-only mode. That is: the 'top' parameter of 'block-commit' cannot
> be the active layer nor its immediate backing chain.
> 
> Signed-off-by: Alberto Garcia <berto@igalia.com>
> ---
>  block/commit.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Max Reitz <mreitz@redhat.com>


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-10-30 19:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28 13:43 [Qemu-devel] [PATCH 0/2] Fix the reopening of images in 'block-commit' Alberto Garcia
2015-10-28 13:43 ` [Qemu-devel] [PATCH 1/2] commit: reopen overlay_bs before base Alberto Garcia
2015-10-30 19:14   ` Max Reitz [this message]
2015-10-28 13:43 ` [Qemu-devel] [PATCH 2/2] qemu-iotests: Test the reopening of overlay_bs in 'block-commit' Alberto Garcia
2015-10-30 19:19   ` Max Reitz
2015-11-03 12:11 ` [Qemu-devel] [PATCH 0/2] Fix the reopening of images " 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=5633C199.8030209@redhat.com \
    --to=mreitz@redhat.com \
    --cc=berto@igalia.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).