summaryrefslogtreecommitdiffstats
path: root/bsd-user/bsdload.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy2022-04-07 15:27:25 +0200
committerVladimir Sementsov-Ogievskiy2022-06-29 09:56:12 +0200
commit6db7fd1ca980f8dd2fd082f13613166e170afd05 (patch)
tree0ba7ed482f029250b27470ac63e5c52b35bda546 /bsd-user/bsdload.c
parentblock/block-copy: block_copy(): add timeout_ns parameter (diff)
downloadqemu-6db7fd1ca980f8dd2fd082f13613166e170afd05.tar.gz
qemu-6db7fd1ca980f8dd2fd082f13613166e170afd05.tar.xz
qemu-6db7fd1ca980f8dd2fd082f13613166e170afd05.zip
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>
Diffstat (limited to 'bsd-user/bsdload.c')
0 files changed, 0 insertions, 0 deletions