qemu-patch-raspberry4/block
Liang Li b76e4458b1 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 <pbonzini@redhat.com>
Cc: Jeff Cody <jcody@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
Cc: Eric Blake <eblake@redhat.com>
Cc: John Snow <jsnow@redhat.com>
Reported-by: Huaitong Han <huanhuaitong@didichuxing.com>
Signed-off-by: Huaitong Han <huanhuaitong@didichuxing.com>
Signed-off-by: Liang Li <liliangleo@didichuxing.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-03-19 12:01:39 +01:00
..
accounting.c block: make accounting thread-safe 2017-06-16 07:55:00 +08:00
backup.c blockjobs: ensure abort is called for cancelled jobs 2018-03-19 12:01:24 +01:00
blkdebug.c block: Switch passthrough drivers to .bdrv_co_block_status() 2018-03-02 18:39:07 +01:00
blkreplay.c block: change variable names in BlockDriverState 2017-06-26 14:54:46 +02:00
blkverify.c Move include qemu/option.h from qemu-common.h to actual users 2018-02-09 13:52:16 +01:00
block-backend.c block: let blk_add/remove_aio_context_notifier() tolerate BDS changes 2018-03-13 15:38:55 -05:00
bochs.c block: Deprecate bdrv_set_read_only() and users 2017-11-17 13:35:59 +01:00
cloop.c block: Deprecate bdrv_set_read_only() and users 2017-11-17 13:35:59 +01:00
commit.c blockjobs: model single jobs as transactions 2018-03-19 12:01:24 +01:00
create.c block: x-blockdev-create QMP command 2018-03-09 15:17:47 +01:00
crypto.c luks: Catch integer overflow for huge sizes 2018-03-19 12:01:24 +01:00
crypto.h qcow: convert QCow to use QCryptoBlock for encryption 2017-07-11 17:44:56 +02:00
curl.c Move include qemu/option.h from qemu-common.h to actual users 2018-02-09 13:52:16 +01:00
dirty-bitmap.c dirty-bitmap: add locked state 2018-03-13 17:05:00 -04:00
dmg-bz2.c dmg: Move libbz2 code to dmg-bz2.so 2016-10-07 14:14:06 +02:00
dmg.c block: Deprecate bdrv_set_read_only() and users 2017-11-17 13:35:59 +01:00
dmg.h block: remove "qemu/osdep.h" from header file 2017-12-18 17:07:02 +03:00
file-posix.c file-posix: Fix no-op bdrv_truncate() with falloc preallocation 2018-03-09 15:17:48 +01:00
file-win32.c file-win32: Support .bdrv_co_create 2018-03-09 15:17:47 +01:00
gluster.c block: include original filename when reporting invalid URIs 2018-03-13 08:06:55 -04:00
io.c block: extract AIO_WAIT_WHILE() from BlockDriverState 2018-03-02 18:39:07 +01:00
iscsi-opts.c Move include qemu/option.h from qemu-common.h to actual users 2018-02-09 13:52:16 +01:00
iscsi.c block: convert bdrv_invalidate_cache callback to coroutine_fn 2018-03-09 15:17:47 +01:00
linux-aio.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
Makefile.objs block: x-blockdev-create QMP command 2018-03-09 15:17:47 +01:00
mirror.c block/mirror: change the semantic of 'force' of block-job-cancel 2018-03-19 12:01:39 +01:00
nbd-client.c nbd: BLOCK_STATUS for standard get_block_status function: client part 2018-03-13 15:43:48 -05:00
nbd-client.h nbd: BLOCK_STATUS for standard get_block_status function: client part 2018-03-13 15:43:48 -05:00
nbd.c nbd: BLOCK_STATUS for standard get_block_status function: client part 2018-03-13 15:43:48 -05:00
nfs.c nfs: Support .bdrv_co_create 2018-03-09 15:17:47 +01:00
null.c null: Switch to .bdrv_co_block_status() 2018-03-02 18:39:07 +01:00
nvme.c nvme: Drop pointless .bdrv_co_get_block_status() 2018-03-02 18:39:07 +01:00
parallels.c parallels: Support .bdrv_co_create 2018-03-19 12:01:39 +01:00
parallels.h Clean up includes 2018-02-09 05:05:11 +01:00
qapi.c Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
qcow.c qcow: Support .bdrv_co_create 2018-03-19 12:01:39 +01:00
qcow2-bitmap.c qcow2: fix flushing after dirty bitmap metadata writes 2018-03-09 15:17:47 +01:00
qcow2-cache.c qcow2: Allow configuring the L2 slice size 2018-02-13 17:00:00 +01:00
qcow2-cluster.c qcow2: Check L1 table parameters in qcow2_expand_zero_clusters() 2018-03-09 15:17:47 +01:00
qcow2-refcount.c qcow2: Make qemu-img check detect corrupted L1 tables in snapshots 2018-03-09 15:17:47 +01:00
qcow2-snapshot.c qcow2: Check snapshot L1 table in qcow2_snapshot_delete() 2018-03-09 15:17:47 +01:00
qcow2.c block: x-blockdev-create QMP command 2018-03-09 15:17:47 +01:00
qcow2.h qcow2: Generalize validate_table_offset() into qcow2_validate_table() 2018-03-09 15:17:47 +01:00
qed-check.c block: convert bdrv_check callback to coroutine_fn 2018-03-09 15:17:47 +01:00
qed-cluster.c qed: protect table cache with CoMutex 2017-07-17 11:34:11 +08:00
qed-l2-cache.c qed: protect table cache with CoMutex 2017-07-17 11:34:11 +08:00
qed-table.c block: convert bdrv_check callback to coroutine_fn 2018-03-09 15:17:47 +01:00
qed.c qed: Support .bdrv_co_create 2018-03-19 12:01:39 +01:00
qed.h qed: protect table cache with CoMutex 2017-07-17 11:34:11 +08:00
quorum.c Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
raw-format.c block: rename .bdrv_create() to .bdrv_co_create_opts() 2018-03-02 18:39:07 +01:00
rbd.c rbd: Use qemu_rbd_connect() in qemu_rbd_do_create() 2018-03-09 15:17:47 +01:00
replication.c Move include qemu/option.h from qemu-common.h to actual users 2018-02-09 13:52:16 +01:00
sheepdog.c block: include original filename when reporting invalid URIs 2018-03-13 08:06:55 -04:00
snapshot.c Move include qemu/option.h from qemu-common.h to actual users 2018-02-09 13:52:16 +01:00
ssh.c ssh: Support .bdrv_co_create 2018-03-09 15:17:48 +01:00
stream.c blockjobs: model single jobs as transactions 2018-03-19 12:01:24 +01:00
throttle-groups.c Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
throttle.c block: Switch passthrough drivers to .bdrv_co_block_status() 2018-03-02 18:39:07 +01:00
trace-events blockjobs: add block-job-finalize 2018-03-19 12:01:24 +01:00
vdi.c vdi: Make comments consistent with other drivers 2018-03-19 12:01:39 +01:00
vhdx-endian.c vhdx: Use QEMU UUID API 2016-09-23 11:42:52 +08:00
vhdx-log.c vhdx: use QEMU_ALIGN_DOWN 2017-08-31 12:29:07 +02:00
vhdx.c vhdx: Support .bdrv_co_create 2018-03-19 12:01:39 +01:00
vhdx.h block: vhdx - update PAYLOAD_BLOCK_UNMAPPED value to match 1.00 spec 2014-12-12 15:42:22 +00:00
vmdk.c block: convert bdrv_check callback to coroutine_fn 2018-03-09 15:17:47 +01:00
vpc.c vpc: Require aligned size in .bdrv_co_create 2018-03-19 12:01:39 +01:00
vvfat.c vvfat: Switch to .bdrv_co_block_status() 2018-03-02 18:39:07 +01:00
vxhs.c qobject: Use simpler QDict/QList scalar insertion macros 2017-05-09 09:13:51 +02:00
win32-aio.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
write-threshold.c Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00