Skip to content
  • Liang Li's avatar
    block/mirror: change the semantic of 'force' of block-job-cancel · b76e4458
    Liang Li authored
    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.
    
    Libvirt depends on the current block-job-cancel semantics, which is that
    when used without a flag after the 'ready' event, the command blocks
    until data is in sync.  However, these semantics are awkward in other
    situations, for example, people may use drive mirror for realtime
    backups while still wanting to use block live migration.  Libvirt cannot
    start a block live migration while another drive mirror is in progress,
    but the user would rather abandon the backup attempt as broken and
    proceed with the live migration than be stuck waiting for the current
    drive mirror backup to finish.
    
    The drive-mirror command already includes a 'force' flag, which libvirt
    does not use, although it documented...
    b76e4458