[libvirt] [PATCH v3 REBASE 13/16] qemu: support getting disks stats during stopping block jobs

Nikolay Shirokovskiy nshirokovskiy at virtuozzo.com
Wed Aug 30 08:59:00 UTC 2017



On 30.08.2017 11:07, Jiri Denemark wrote:
> 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
> 

I see. I obviously supposed we can fetch disks stats even after ready
state. Well if not then code will be simplier)

Nikolay




More information about the libvir-list mailing list