]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Allow timeouts waiting for QEMU job lock
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 3 Nov 2009 18:34:20 +0000 (13:34 -0500)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 10 Nov 2009 13:27:18 +0000 (13:27 +0000)
commit9b6efcfef1e240df0b39ed69c159bb0ae53e1d78
tree67ac6457e3d1480a36449138a25ca9f40d598ae8
parentf9c56cce7919bc0267d3c825f622df54301b21c7
Allow timeouts waiting for QEMU job lock

Some monitor commands may take a very long time to complete. It is
not desirable to block other incoming API calls forever. With this
change, if an existing API call is holding the job lock, additional
API calls will not wait forever. They will time out after a short
period of time, allowing application to retry later.

* include/libvirt/virterror.h, src/util/virterror.c: Add new
  VIR_ERR_OPERATION_TIMEOUT error code
* src/qemu/qemu_driver.c: Change to a timed condition variable
  wait for acquiring the monitor job lock
include/libvirt/virterror.h
src/qemu/qemu_driver.c
src/util/virterror.c