From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: pkrempa@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/2] block/snapshot: Restrict set of snapshot nodes
Date: Tue, 17 Sep 2019 08:52:00 -0500 [thread overview]
Message-ID: <39e27987-e29b-570d-b7c5-970aed3028cf@redhat.com> (raw)
In-Reply-To: <20190917110443.2029-2-kwolf@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 1554 bytes --]
On 9/17/19 6:04 AM, Kevin Wolf wrote:
> Nodes involved in internal snapshots were those that were returned by
> bdrv_next(), inserted and not read-only. bdrv_next() in turn returns all
> nodes that are either the root node of a BlockBackend or monitor-owned
> nodes.
>
> With the typical -drive use, this worked well enough. However, in the
> typical -blockdev case, the user defines one node per option, making all
> nodes monitor-owned nodes. This includes protocol nodes etc. which often
> are not snapshottable, so "savevm" only returns an error.
>
> Change the conditions so that internal snapshot still include all nodes
> that have a BlockBackend attached (we definitely want to snapshot
> anything attached to a guest device and probably also the built-in NBD
> server; snapshotting block job BlockBackends is more of an accident, but
> a preexisting one), but other monitor-owned nodes are only included if
> they have no parents.
>
> This makes internal snapshots usable again with typical -blockdev
> configurations.
>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> block/snapshot.c | 26 +++++++++++++++++++-------
> 1 file changed, 19 insertions(+), 7 deletions(-)
Makes sense. But you'll want Peter's review that it actually passes
testing with libvirt, rather than relying solely on my:
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-09-17 13:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-17 11:04 [Qemu-devel] [PATCH 0/2] block/snapshot: Restrict set of snapshot nodes Kevin Wolf
2019-09-17 11:04 ` [Qemu-devel] [PATCH 1/2] " Kevin Wolf
2019-09-17 13:52 ` Eric Blake [this message]
2019-09-20 16:02 ` Max Reitz
2019-09-17 11:04 ` [Qemu-devel] [PATCH 2/2] iotests: Test internal snapshots with -blockdev Kevin Wolf
2019-09-20 11:44 ` Max Reitz
2019-09-17 15:37 ` [Qemu-devel] [PATCH 0/2] block/snapshot: Restrict set of snapshot nodes Peter Krempa
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=39e27987-e29b-570d-b7c5-970aed3028cf@redhat.com \
--to=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pkrempa@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).