aboutsummaryrefslogtreecommitdiff
path: root/include/exec/helper-proto.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2019-09-17 12:26:23 +0200
committerMichael Roth <mdroth@linux.vnet.ibm.com>2019-11-04 08:06:36 -0600
commit7a8aa6c734bb1c2927ad0cc1d10bcacb53cf4ae3 (patch)
treedbc14c8bc0ee809140f2d3cae02f545015d2c82d /include/exec/helper-proto.h
parent331c08d300aab154560d870b2be424f663d260b2 (diff)
block/snapshot: Restrict set of snapshot nodes
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> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Tested-by: Peter Krempa <pkrempa@redhat.com> (cherry picked from commit 05f4aced658a02b02d3e89a6c7a2281008fcf26c) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'include/exec/helper-proto.h')
0 files changed, 0 insertions, 0 deletions