qemu: blockjob: Reset disk source index after pivot
qemu: blockjob: Reset disk source index after pivot

Since we are re-detecting the backing chain after pivoting to the active
block commit target (or block copy target) the disk index needs to be
reset to 0. This is necessary since we move a member of the backing
chain to disk->src but clear indexes only starting from
disk->src->backingStore. The freshly detected images have indexes
starting from 1, but since we've pivoted into an image which was
previously a backing store it would have a non-0 index.
The lookup function would then return the top of the chain for queries
like 'vda[1]' instead of the first backing store.

This problem will not be present once we keep the disk indexes stable.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1519745

nertpinx/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,libvirt/libvirt,andreabolognani/libvirt,jfehlig/libvirt,olafhering/libvirt,crobinso/libvirt,eskultety/libvirt,nertpinx/libvirt,jfehlig/libvirt,nertpinx/libvirt,olafhering/libvirt,fabianfreyer/libvirt,eskultety/libvirt,libvirt/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,nertpinx/libvirt,zippy2/libvirt,fabianfreyer/libvirt,crobinso/libvirt,eskultety/libvirt,eskultety/libvirt,zippy2/libvirt,jfehlig/libvirt,jfehlig/libvirt,jardasgit/libvirt,jardasgit/libvirt,olafhering/libvirt,zippy2/libvirt,crobinso/libvirt,libvirt/libvirt,crobinso/libvirt,nertpinx/libvirt,olafhering/libvirt,andreabolognani/libvirt,eskultety/libvirt,jardasgit/libvirt,zippy2/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,andreabolognani/libvirt,libvirt/libvirt,jardasgit/libvirt