On 06.04.22 20:08, Vladimir Sementsov-Ogievskiy wrote:
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_fligth during block_copy operation even if it's timed-out.

*flight

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 <vsement...@openvz.org>
---
  qapi/block-core.json      |  8 +++++++-
  block/copy-before-write.c | 23 ++++++++++++++++++++++-
  2 files changed, 29 insertions(+), 2 deletions(-)

Reviewed-by: Hanna Reitz <hre...@redhat.com>


Reply via email to