diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 7145a2a99de07ffb7d4dca619577394bc4bcc0bd..e47bc2d8f0f5b2badf9a47d470f0c3e4251f384d 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 a5f6a3c75b8335619eb2cf842982f849e61a0236..5fe5319ab931e592a23aa54b82ee174f157d0776 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,