[libvirt] [PATCHv3 34/36] qemu: caps: Add capability for change-backing-file command

Peter Krempa pkrempa at redhat.com
Fri May 30 08:37:56 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 08c3d04..05613e5 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -256,6 +256,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
               "usb-kbd", /* 165 */
               "host-pci-multidomain",
               "msg-timestamp",
+              "change-backing-file",
     );


@@ -1382,6 +1383,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 d755caa..f6bca5d 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -206,6 +206,7 @@ enum virQEMUCapsFlags {
     QEMU_CAPS_DEVICE_USB_KBD     = 165, /* -device usb-kbd */
     QEMU_CAPS_HOST_PCI_MULTIDOMAIN = 166, /* support domain > 0 in host pci address */
     QEMU_CAPS_MSG_TIMESTAMP      = 167, /* -msg timestamp */
+    QEMU_CAPS_CHANGE_BACKING_FILE = 168, /* change namen 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