]> xenbits.xensource.com Git - libvirt.git/commit
blockjob: wire up qemu async virDomainBlockJobAbort
authorEric Blake <eblake@redhat.com>
Wed, 11 Apr 2012 22:17:36 +0000 (16:17 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 12 Apr 2012 03:22:06 +0000 (21:22 -0600)
commita91ce852b5a1ee2f9f2cbf0bb47612d429ed531a
treeef463321978986eb3ee30fab8e91a668dbe57762
parentecb39e9d4beb6a5e291e8c2d046130b9ce456c7f
blockjob: wire up qemu async virDomainBlockJobAbort

Without the VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNC flag, libvirt will internally
poll using qemu's "query-block-jobs" API and will not return until the
operation has been completed.  API users are advised that this operation
is unbounded and further interaction with the domain during this period
may block.  Future patches may refactor things to allow other queries in
parallel with this polling.  For older qemu, we synthesize the cancellation
event, since qemu won't generate it.

The choice of polling duration copies from the code in qemu_migration.c.

Signed-off-by: Adam Litke <agl@us.ibm.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
src/qemu/qemu_driver.c
src/qemu/qemu_monitor_json.c