From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 1/3] block: Activate recursively even for already active nodes
Date: Thu, 19 Dec 2019 13:46:13 +0100 [thread overview]
Message-ID: <c1719dd0-0e7f-c606-f69d-3bfdbef3f348@redhat.com> (raw)
In-Reply-To: <20191217145939.5537-2-kwolf@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 1241 bytes --]
On 17.12.19 15:59, Kevin Wolf wrote:
> bdrv_invalidate_cache_all() assumes that all nodes in a given subtree
> are either active or inactive when it starts. Therefore, as soon as it
> arrives at an already active node, it stops.
>
> However, this assumption is wrong. For example, it's possible to take a
> snapshot of an inactive node, which results in an active overlay over an
> inactive backing file. The active overlay is probably also the root node
> of an inactive BlockBackend (blk->disable_perm == true).
>
> In this case, bdrv_invalidate_cache_all() does not need to do anything
> to activate the overlay node, but it still needs to recurse into the
> children and the parents to make sure that after returning success,
> really everything is activated.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> block.c | 50 ++++++++++++++++++++++++--------------------------
> 1 file changed, 24 insertions(+), 26 deletions(-)
Basically the only change is to not skip the whole function when the
node is already active but only the part that actually activates the
node. blk_root_activate() is a no-op for already-active BBs, so this
looks good to me.
Reviewed-by: Max Reitz <mreitz@redhat.com>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-12-19 12:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 14:59 [PATCH 0/3] block: Fix external snapshot with VM state Kevin Wolf
2019-12-17 14:59 ` [PATCH 1/3] block: Activate recursively even for already active nodes Kevin Wolf
2019-12-18 17:02 ` Kevin Wolf
2019-12-19 12:46 ` Max Reitz [this message]
2019-12-17 14:59 ` [PATCH 2/3] hmp: Allow using qdev ID for qemu-io command Kevin Wolf
2019-12-17 14:59 ` [PATCH 3/3] iotests: Test external snapshot with VM state Kevin Wolf
2019-12-19 14:26 ` Max Reitz
2019-12-19 15:47 ` Kevin Wolf
2020-01-02 13:25 ` Dr. David Alan Gilbert
2020-01-06 16:06 ` Kevin Wolf
2020-02-10 12:31 ` Dr. David Alan Gilbert
2020-02-10 13:37 ` 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=c1719dd0-0e7f-c606-f69d-3bfdbef3f348@redhat.com \
--to=mreitz@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).