[libvirt] [PATCHv5 13/19] qemu: caps: Add capability for change-backing-file command

Peter Krempa pkrempa at redhat.com
Thu Jun 19 13:59:38 UTC 2014


This command allows to change the backing file name recorded in the
metadata of a qcow (or other) image. The capability also notifies that
the "block-stream" and "block-commit" commands understand the
"backing-file" attribute.
---
 src/qemu/qemu_capabilities.c | 2 ++
 src/qemu/qemu_capabilities.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 4cbe8d1..df3f529 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -257,6 +257,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
               "host-pci-multidomain",
               "msg-timestamp",
               "active-commit",
+              "change-backing-file",
     );


@@ -1410,6 +1411,7 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
     { "blockdev-snapshot-sync", QEMU_CAPS_DISK_SNAPSHOT },
     { "add-fd", QEMU_CAPS_ADD_FD },
     { "nbd-server-start", QEMU_CAPS_NBD_SERVER },
+    { "change-backing-file", QEMU_CAPS_CHANGE_BACKING_FILE },
 };

 struct virQEMUCapsStringFlags virQEMUCapsEvents[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 617986d..ea2d9e3 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -207,6 +207,7 @@ enum virQEMUCapsFlags {
     QEMU_CAPS_HOST_PCI_MULTIDOMAIN = 166, /* support domain > 0 in host pci address */
     QEMU_CAPS_MSG_TIMESTAMP      = 167, /* -msg timestamp */
     QEMU_CAPS_ACTIVE_COMMIT      = 168, /* block-commit works without 'top' */
+    QEMU_CAPS_CHANGE_BACKING_FILE = 169, /* change name of backing file in metadata */

     QEMU_CAPS_LAST,                   /* this must always be the last item */
 };
-- 
1.9.3




More information about the libvir-list mailing list