• E
    blockjob: turn on qemu capability bit for active commit · 40ad7160
    Eric Blake 提交于
    Use the probing functionality added in the last patch to turn on
    a capability bit when active commit is present, and gate active
    commit on that capability.
    
    For my own reference: the difference between BLOCKJOB_SYNC and
    BLOCKJOB_ASYNC is whether qemu generated an event at the
    conclusion of blockpull; basically, RHEL 6.2 was the only release
    of qemu that has the sync semantics and lacks the event.  RHEL
    6.3 added blockcopy, but also picked up on the upstream style
    of qemu generating events.  As no one is likely to backport
    active commit to RHEL 6.2, it's safe for blockcommit to always
    require async blockjob support.
    
    Modifying qemucapabilitiestest is painful; the .replies files would
    be so much easier if they had comments correlating which command
    generated the given reply.  Maybe I'll fix that up later...
    
    * src/qemu/qemu_capabilities.h (QEMU_CAPS_ACTIVE_COMMIT): New
    capability.
    * src/qemu/qemu_driver.c (qemuDomainBlockCommit): Use the new bit
    * src/qemu/qemu_capabilities.c (virQEMUCaps): Name the new bit.
    (virQEMUCapsProbeQMPCommands): Set it.
    * tests/qemucapabilitiesdata/caps_1.3.1-1.replies: Update.
    * tests/qemucapabilitiesdata/caps_1.4.2-1.replies: Likewise.
    * tests/qemucapabilitiesdata/caps_1.5.3-1.replies: Likewise.
    * tests/qemucapabilitiesdata/caps_1.6.0-1.replies: Likewise.
    * tests/qemucapabilitiesdata/caps_1.6.50-1.replies: Likewise.
    Signed-off-by: NEric Blake <eblake@redhat.com>
    40ad7160
caps_1.4.2-1.replies 31.8 KB