For the modern use cases we are going to use 'blockdev-snapshot' instead
of 'blockdev-snapshot-sync'.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_block.c | 15 +++++++++++++++
src/qemu/qemu_block.h | 5 +++++
2 files changed, 20 insertions(+)
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 7145a2a99d..e47bc2d8f0 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -1886,6 +1886,21 @@ qemuBlockSnapshotAddLegacy(virJSONValuePtr actions,
}
+int
+qemuBlockSnapshotAddBlockdev(virJSONValuePtr actions,
+ virDomainDiskDefPtr disk,
+ virStorageSourcePtr newsrc)
+{
+ if (qemuMonitorJSONTransactionAdd(actions, "blockdev-snapshot",
+ "s:node", disk->src->nodeformat,
+ "s:overlay", newsrc->nodeformat,
+ NULL) < 0)
+ return -1;
+
+ return 0;
+}
+
+
/**
* qemuBlockStorageGetCopyOnReadProps:
* @disk: disk with copy-on-read enabled
diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h
index a5f6a3c75b..5fe5319ab9 100644
--- a/src/qemu/qemu_block.h
+++ b/src/qemu/qemu_block.h
@@ -163,6 +163,11 @@ qemuBlockSnapshotAddLegacy(virJSONValuePtr actions,
virStorageSourcePtr newsrc,
bool reuse);
+int
+qemuBlockSnapshotAddBlockdev(virJSONValuePtr actions,
+ virDomainDiskDefPtr disk,
+ virStorageSourcePtr newsrc);
+
int
qemuBlockStorageSourceCreateGetFormatProps(virStorageSourcePtr src,
virStorageSourcePtr backing,
--
2.21.0