[pve-devel] [RFC qemu 4/7] block/backup: make cbw error also fail backup that does not use fleecing

Fiona Ebner f.ebner at proxmox.com
Mon Jun 10 14:59:39 CEST 2024


If the backup target can't be reached or is very slow, then the
default behavior for QEMU backup is to break the guest write. While an
option to change this was introduced with the 'on-cbw-error' option
for the copy-before-write filter, it only took an effect in
combination with a snapshot-access node like is used for backup
fleecing.

In preparation to set the 'on-cbw-error' option for PVE backups that
do not use fleecing.

Unfortunately, the name for the option is "break-snapshot", but in the
non-fleecing case, there is no snapshot-access node involved, so it's
a bit of a misnomer.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 block/backup.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/block/backup.c b/block/backup.c
index 82fedf1680..ba153110d3 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -202,6 +202,9 @@ static int coroutine_fn backup_loop(BackupBlockJob *job)
 out:
     block_copy_call_free(s);
     job->bg_bcs_call = NULL;
+    if (!ret) {
+        ret = bdrv_cbw_snapshot_error(job->cbw);
+    }
     return ret;
 }
 
-- 
2.39.2





More information about the pve-devel mailing list