On 10/23/2014 04:52 AM, Kevin Wolf wrote: > Am 22.10.2014 um 14:51 hat Max Reitz geschrieben: >> Instead of taking the total length of the block device as the block >> job's length, use the number of dirty sectors. The progress is now the >> number of sectors mirrored to the target block device. Note that this >> may result in the job's length increasing during operation, which is >> however in fact desirable. > > More importantly, because it might surprise management tools, is that > the progress (as in offset/len) can actually decrease now.
Decreased progress is a GOOD thing - it tells management that the guest is causing I/O faster than the mirroring can keep up with, and that it might be time to turn on some throttling if the mirror is going to have a chance at converging. The old code didn't have any correlation to progress complete vs work remaining, making it harder to accurately estimate how long a job still has to go. > > I can't say whether that creates any problem, I'll rely on Eric's > Reviewed-by for that. Libvirt has already documented that for all jobs (including block jobs), progress is estimated by offset/total, but that total need not be constant between two consecutive calls, precisely for the behavior that this patch moves toward. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature