Re: [PATCHv8 03/11] blockjob: add qemu capabilities related to block jobs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]