qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] block/snapshot: Restrict set of snapshot no


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 1/2] block/snapshot: Restrict set of snapshot nodes
Date: Tue, 17 Sep 2019 08:52:00 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

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: address@hidden
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
>  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 <address@hidden>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]