]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: improve waiting for block job readiness
authorMichael Chapman <mike@very.puzzling.org>
Wed, 27 Jan 2016 02:24:54 +0000 (13:24 +1100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 1 Feb 2016 17:04:48 +0000 (18:04 +0100)
commit86c4df83b913dd73b79caeed2038291374384dc5
tree8f632589f3738eabc151a93e800e2f5b085a3421
parent8fa216bbb40df33e7fce5d727aa3dc334480878a
virsh: improve waiting for block job readiness

After a block job hits 100%, we only need to apply a timeout waiting for
a block job event if exactly one of the BLOCK_JOB or BLOCK_JOB_2
callbacks were able to be registered.

If neither callback could be registered, there's clearly no need for a
timeout.

If both callbacks were registered, then we're guaranteed to eventually
get one of the events. The path being used by virsh must be exactly the
source path or target device in the domain's disk definition, and these
are the respective strings sent back in these two events.

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
tools/virsh-domain.c