On Wed, Jan 27, 2016 at 13:24:54 +1100, Michael Chapman wrote:
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(a)very.puzzling.org>
---
tools/virsh-domain.c | 50 ++++++++++++++++++++++++++++----------------------
1 file changed, 28 insertions(+), 22 deletions(-)
ACK, I had to test this one a bit to get the desired reproducibility.
I've also re-verified the claim that block job name will be matched only
to the extent to what libvirt returns in the event, thus this change
should be okay.
I'll push the series in a while. Thanks for keeping through review.
Peter