]> Git Repo - qemu.git/commit
block/mirror: change the semantic of 'force' of block-job-cancel
authorLiang Li <[email protected]>
Tue, 13 Mar 2018 12:12:16 +0000 (08:12 -0400)
committerKevin Wolf <[email protected]>
Mon, 19 Mar 2018 11:01:39 +0000 (12:01 +0100)
commitb76e4458b1eb3c32e9824fe6aa51f67d2b251748
tree457f190a9d5e03863a5a2b750611badf101183ce
parent1cfeaf386e3727df0e057710d61593ca515dd07b
block/mirror: change the semantic of 'force' of block-job-cancel

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 the flag as only being useful to
quit a job which is paused.  However, since quitting a paused job has
the same effect as abandoning a backup in a non-paused job (namely, the
destination file is not in sync, and the command completes immediately),
we can just improve the documentation to make the force flag obviously
useful.

Cc: Paolo Bonzini <[email protected]>
Cc: Jeff Cody <[email protected]>
Cc: Kevin Wolf <[email protected]>
Cc: Max Reitz <[email protected]>
Cc: Eric Blake <[email protected]>
Cc: John Snow <[email protected]>
Reported-by: Huaitong Han <[email protected]>
Signed-off-by: Huaitong Han <[email protected]>
Signed-off-by: Liang Li <[email protected]>
Signed-off-by: Jeff Cody <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/mirror.c
blockdev.c
blockjob.c
hmp-commands.hx
include/block/blockjob.h
qapi/block-core.json
tests/test-blockjob-txn.c
This page took 0.026215 seconds and 4 git commands to generate.