[0/2] block/snapshot: Restrict set of snapshot nodes
mbox series

Message ID 20190917110443.2029-1-kwolf@redhat.com
Headers show
Series
  • block/snapshot: Restrict set of snapshot nodes
Related show

Message

Kevin Wolf Sept. 17, 2019, 11:04 a.m. UTC
This fixes internal snapshots with separately defined protocol nodes
(like libvirt will do with -blockdev).

Kevin Wolf (2):
  block/snapshot: Restrict set of snapshot nodes
  iotests: Test internal snapshots with -blockdev

 block/snapshot.c                 |  26 +++--
 tests/qemu-iotests/267           | 165 ++++++++++++++++++++++++++++
 tests/qemu-iotests/267.out       | 182 +++++++++++++++++++++++++++++++
 tests/qemu-iotests/common.filter |   5 +-
 tests/qemu-iotests/group         |   1 +
 5 files changed, 368 insertions(+), 11 deletions(-)
 create mode 100755 tests/qemu-iotests/267
 create mode 100644 tests/qemu-iotests/267.out

Comments

Peter Krempa Sept. 17, 2019, 3:37 p.m. UTC | #1
On Tue, Sep 17, 2019 at 13:04:41 +0200, Kevin Wolf wrote:
> This fixes internal snapshots with separately defined protocol nodes
> (like libvirt will do with -blockdev).

The code change is exactly what I thought would be necessary in this
case. I've tested it with my blockdev code in libvirt enabled and all
three internal snapshot commands seem to work as expected even when
fully using blockdev and also only the top layer gets the snapshot.

I'll send patches that attempt adding introspection to allow libvirt
detecting this fix.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Tested-by: Peter Krempa <pkrempa@redhat.com>