
On 10/20/2012 03:47 PM, Eric Blake wrote:
Upstream qemu 1.3 is adding two new monitor commands, 'drive-mirror' and 'block-job-complete'[1], which can drive live block copy and storage migration. Additionally, RHEL 6.3 had backported an earlier version of most of the same functionality, but under the names '__com.redhat_drive-mirror' and '__com.redhat_drive-reopen' and with slightly different JSON arguments, which we can support without too much extra effort.
@@ -1884,6 +1886,10 @@ qemuCapsProbeQMPCommands(qemuCapsPtr caps, qemuCapsSet(caps, QEMU_CAPS_KVM); else if (strstr(name, "block-commit")) qemuCapsSet(caps, QEMU_CAPS_BLOCK_COMMIT); + else if (strstr(name, "drive-mirror")) + qemuCapsSet(caps, QEMU_CAPS_DRIVE_MIRROR);
Off-list, it was pointed out to me that strstr() is a bit weak; I'm changing this to: if (STREQ(name, "drive-mirror") || STREQ(name, "__com.redhat_drive-mirror")) as that is more robust to any future QMP commands that happen to contain the substring drive-mirror. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org