qemu-e2k/block
Vladimir Sementsov-Ogievskiy 6db7fd1ca9 block/copy-before-write: implement cbw-timeout option
In some scenarios, when copy-before-write operations lasts too long
time, it's better to cancel it.

Most useful would be to use the new option together with
on-cbw-error=break-snapshot: this way if cbw operation takes too long
time we'll just cancel backup process but do not disturb the guest too
much.

Note the tricky point of realization: we keep additional point in
bs->in_flight during block_copy operation even if it's timed-out.
Background "cancelled" block_copy operations will finish at some point
and will want to access state. We should care to not free the state in
.bdrv_close() earlier.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
  [vsementsov: use bdrv_inc_in_flight()/bdrv_dec_in_flight() instead of
   direct manipulation on bs->in_flight]
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
2022-06-29 10:56:12 +03:00
..
export vduse-blk: Add name option 2022-06-24 17:07:06 +02:00
monitor block: improve block_dirty_bitmap_merge(): don't allocate extra bitmap 2022-06-24 17:07:06 +02:00
accounting.c
aio_task.c
amend.c block/amend: Keep strong reference to BDS 2022-03-04 18:18:26 +01:00
backup.c block: simplify handling of try to merge different sized bitmaps 2022-06-24 17:07:06 +02:00
blkdebug.c
blklogwrites.c
blkreplay.c
blkverify.c Replace GCC_FMT_ATTR with G_GNUC_PRINTF 2022-03-22 14:40:51 +04:00
block-backend.c block: Support passing NULL ops to blk_set_dev_ops() 2022-06-24 17:07:06 +02:00
block-copy.c block/block-copy: block_copy(): add timeout_ns parameter 2022-06-29 10:56:12 +03:00
block-gen.h
bochs.c
cloop.c
commit.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
copy-before-write.c block/copy-before-write: implement cbw-timeout option 2022-06-29 10:56:12 +03:00
copy-before-write.h block/copy-before-write.h: global state API + assertions 2022-03-04 18:18:25 +01:00
copy-on-read.c
copy-on-read.h Clean up ill-advised or unusual header guards 2022-05-11 16:50:01 +02:00
coroutines.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
create.c block_int-common.h: assertions in the callers of BlockDriver function pointers 2022-03-04 18:18:25 +01:00
crypto.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
crypto.h
curl.c block/curl.c: Check error return from curl_easy_setopt() 2022-03-07 09:19:20 +01:00
dirty-bitmap.c block: simplify handling of try to merge different sized bitmaps 2022-06-24 17:07:06 +02:00
dmg-bz2.c
dmg-lzfse.c
dmg.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
dmg.h
file-posix.c block: move fcntl_setfl() 2022-05-03 15:17:53 +04:00
file-win32.c
filter-compress.c
gluster.c block/gluster: correctly set max_pdiscard 2022-06-24 17:07:06 +02:00
io_uring.c Use io_uring_register_ring_fd() to skip fd operations 2022-06-15 14:50:41 +01:00
io.c block: drop unused bdrv_co_drain() API 2022-06-24 17:07:06 +02:00
iscsi-opts.c
iscsi.c include: move qemu_get_vm_name() to sysemu.h 2022-04-06 14:31:43 +02:00
linux-aio.c linux-aio: explain why max batch is checked in laio_io_unplug() 2022-06-15 16:43:42 +01:00
meson.build block: introduce snapshot-access block driver 2022-03-07 09:33:31 +01:00
mirror.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
nbd.c nbd: Drop dead code spotted by Coverity 2022-06-24 17:07:06 +02:00
nfs.c
null.c
nvme.c Replace qemu_real_host_page variables with inlined functions 2022-04-06 10:50:38 +02:00
parallels-ext.c block: Fix misleading hexadecimal format 2022-03-24 10:38:42 +00:00
parallels.c Replace qemu_real_host_page variables with inlined functions 2022-04-06 10:50:38 +02:00
parallels.h
preallocate.c block: fix preallocate filter: don't do unaligned preallocate requests 2022-03-07 09:19:20 +01:00
progress_meter.c
qapi-sysemu.c block: add 'force' parameter to 'blockdev-change-medium' command 2022-04-25 12:02:36 +02:00
qapi.c
qcow2-bitmap.c
qcow2-cache.c Replace qemu_real_host_page variables with inlined functions 2022-04-06 10:50:38 +02:00
qcow2-cluster.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
qcow2-refcount.c qcow2: Add errp to rebuild_refcount_structure() 2022-04-20 12:09:17 +02:00
qcow2-snapshot.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
qcow2-threads.c
qcow2.c qcow2: Do not reopen data_file in invalidate_cache 2022-05-04 15:55:23 +02:00
qcow2.h Replace GCC_FMT_ATTR with G_GNUC_PRINTF 2022-03-22 14:40:51 +04:00
qcow.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
qed-check.c
qed-cluster.c
qed-l2-cache.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
qed-table.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
qed.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
qed.h
quorum.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
raw-format.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
rbd.c block/rbd: report a better error when namespace does not exist 2022-06-24 17:07:06 +02:00
replication.c
reqlist.c block/reqlist: add reqlist_wait_all() 2022-03-07 09:33:30 +01:00
snapshot-access.c block: introduce snapshot-access block driver 2022-03-07 09:33:31 +01:00
snapshot.c include/block/snapshot: global state API + assertions 2022-03-04 18:18:25 +01:00
ssh.c Replace GCC_FMT_ATTR with G_GNUC_PRINTF 2022-03-22 14:40:51 +04:00
stream.c block/stream: Drain subtree around graph change 2022-03-29 16:30:55 +02:00
throttle-groups.c
throttle.c
trace-events
trace.h
vdi.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
vhdx-endian.c
vhdx-log.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
vhdx.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
vhdx.h
vmdk.c block/vmdk: Fix reopening bs->file 2022-05-04 15:55:23 +02:00
vpc.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
vvfat.c
win32-aio.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
write-threshold.c