On 01/30/2018 03:38 AM, Liang Li wrote: > When doing drive mirror to a low speed shared storage, if there was heavy > BLK IO write workload in VM after the 'ready' event, drive mirror block job > can't be canceled immediately, it would keep running until the heavy BLK IO > workload stopped in the VM. > > Because libvirt depends on block-job-cancel for block live migration, the > current block-job-cancel has the semantic to make sure data is in sync after > the 'ready' event. This semantic can't meet some requirement, for example, > people may use drive mirror for realtime backup while need the ability of > block live migration. If drive mirror can't not be cancelled immediately, > it means block live migration need to wait, because libvirt make use drive > mirror to implement block live migration and only one drive mirror block > job is allowed at the same time for a give block dev. > > We need a new interface for 'force cancel', which could quit block job > immediately if don't care about whether data is in sync or not. > > 'force' is not used by libvirt currently, to make things simple, change > it's semantic slightly, hope it will not break some use case which need its > original semantic. > > Cc: Paolo Bonzini <pbonz...@redhat.com> > Cc: Jeff Cody <jc...@redhat.com> > Cc: Kevin Wolf <kw...@redhat.com> > Cc: Max Reitz <mre...@redhat.com> > Cc: Eric Blake <ebl...@redhat.com> > Cc: John Snow <js...@redhat.com> > Reported-by: Huaitong Han <huanhuait...@didichuxing.com> > Signed-off-by: Huaitong Han <huanhuait...@didichuxing.com> > Signed-off-by: Liang Li <liliang...@didichuxing.com>
Just a note to JTC that this will conflict with my two series trying to refactor jobs: (1) [Qemu-devel] [PATCH v2 00/13] blockjob: refactor mirror_throttle (2) [Qemu-devel] [RFC v3 00/14] blockjobs: add explicit job management​