On Thu, Aug 24, 2017 at 09:56:50 +0300, Nikolay Shirokovskiy wrote: > Let's store disks stats for completed mirror jobs in current > job info. So on getting migration job stats thru API > we take records for completed jobs from current job info > and records for still active jobs by querying qemu process. > > As we need to keep disks stats for completed mirror jobs > in current job let's zero out migration stats conditionally > in fetching function. This and the following hacks are not really needed. You can keep reading block jobs stats until they become ready (VIR_DOMAIN_DISK_MIRROR_STATE_READY) at which point the stats will report the disk was completely transferred and they will not be updated anymore. QEMU does not provide any statistics about data transferred during the mirroring phase. Thus you can just fetch and store all block job stats at the end of qemuMigrationDriveMirror when storage migration phase is finished. Asking QEMU after this point doesn't make sense. Jirka -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list