]> xenbits.xensource.com Git - libvirt.git/commit
virsh: Refactor block job waiting in cmdBlockPull
authorPeter Krempa <pkrempa@redhat.com>
Mon, 13 Jul 2015 15:04:49 +0000 (17:04 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 21 Jul 2015 13:32:59 +0000 (15:32 +0200)
commit2e7827636476fdf976f17cd234b636973dedffc0
tree2c9976394d974009dfdd6db718fff0c7603a8b07
parenteae59247c59aa02147b2b4a50177e8e877fdb218
virsh: Refactor block job waiting in cmdBlockPull

Introduce helper function that will provide logic for waiting for block
job completion so the 3 open coded places can be unified and improved.

This patch introduces the whole logic and uses it to fix
cmdBlockJobPull. The vshBlockJobWait function provides common logic for
block job waiting that should be robust enough to work across all
previous versions of libvirt. Since virsh allows passing user-provided
strings as paths of block devices we can't reliably use block job events
for detection of block job states so the function contains a great deal
of fallback logic.
tools/virsh-domain.c