+#endif /* PROXMOX_BACKUP_CLIENT_H */
diff --git a/pve-backup.c b/pve-backup.c
new file mode 100644
-index 0000000000..389d6c84a0
+index 0000000000..f77892a509
--- /dev/null
+++ b/pve-backup.c
@@ -0,0 +1,938 @@
+ goto err;
+ }
+
-+ di->target = bdrv_open(di->targetfile, NULL, NULL, flags, &local_err);
++ di->target = bdrv_co_open(di->targetfile, NULL, NULL, flags, &local_err);
+ if (!di->target) {
+ error_propagate(task->errp, local_err);
+ goto err;
diff --git a/pve-backup.c b/pve-backup.c
-index 389d6c84a0..c4cbff7fb1 100644
+index f77892a509..d9942a14a1 100644
--- a/pve-backup.c
+++ b/pve-backup.c
@@ -7,6 +7,7 @@
NULL, NULL,
devlist, qdict_haskey(qdict, "speed"), speed, &error);
diff --git a/pve-backup.c b/pve-backup.c
-index c4cbff7fb1..95f742e1d1 100644
+index d9942a14a1..8f18145255 100644
--- a/pve-backup.c
+++ b/pve-backup.c
@@ -10,6 +10,7 @@
2 files changed, 38 insertions(+)
diff --git a/pve-backup.c b/pve-backup.c
-index 95f742e1d1..9eb8645e63 100644
+index 8f18145255..1400c21c49 100644
--- a/pve-backup.c
+++ b/pve-backup.c
@@ -1054,3 +1054,12 @@ BackupStatus *qmp_query_backup(Error **errp)
info->zero_bytes, zero_per);
diff --git a/pve-backup.c b/pve-backup.c
-index 9eb8645e63..2db35f90e0 100644
+index 1400c21c49..0a0996b971 100644
--- a/pve-backup.c
+++ b/pve-backup.c
@@ -48,6 +48,7 @@ static struct PVEBackupState {
+ goto err_mutex;
}
- di->target = bdrv_open(di->targetfile, NULL, NULL, flags, &local_err);
+ di->target = bdrv_co_open(di->targetfile, NULL, NULL, flags, &local_err);
if (!di->target) {
error_propagate(task->errp, local_err);
- goto err;
1 file changed, 50 insertions(+), 113 deletions(-)
diff --git a/pve-backup.c b/pve-backup.c
-index 2db35f90e0..b4bc2de76e 100644
+index 0a0996b971..629da3e6c7 100644
--- a/pve-backup.c
+++ b/pve-backup.c
@@ -54,6 +54,7 @@ static struct PVEBackupState {
2 files changed, 138 insertions(+), 79 deletions(-)
diff --git a/pve-backup.c b/pve-backup.c
-index b4bc2de76e..6d6d7708b6 100644
+index 629da3e6c7..1da9dd9edc 100644
--- a/pve-backup.c
+++ b/pve-backup.c
@@ -35,7 +35,9 @@ const char *PBS_BITMAP_NAME = "pbs-incremental-dirty-bitmap";
+ NULL);
+}
diff --git a/pve-backup.c b/pve-backup.c
-index 6d6d7708b6..e9264e5025 100644
+index 1da9dd9edc..e0e38063a8 100644
--- a/pve-backup.c
+++ b/pve-backup.c
@@ -1110,6 +1110,7 @@ ProxmoxSupportStatus *qmp_query_proxmox_support(Error **errp)
static void proxmox_backup_schedule_wake(void *data) {
CoCtxData *waker = (CoCtxData *)data;
diff --git a/pve-backup.c b/pve-backup.c
-index e9264e5025..4536650b24 100644
+index e0e38063a8..88e507b3c2 100644
--- a/pve-backup.c
+++ b/pve-backup.c
@@ -356,7 +356,7 @@ static void job_cancel_bh(void *opaque) {
goto err_mutex;
}
- di->target = bdrv_open(di->targetfile, NULL, NULL, flags, &local_err);
+ di->target = bdrv_co_open(di->targetfile, NULL, NULL, flags, &local_err);
if (!di->target) {
- error_propagate(task->errp, local_err);
+ error_propagate(errp, local_err);
NULL, // PBS backup-id
false, 0, // PBS backup-time
diff --git a/pve-backup.c b/pve-backup.c
-index 4536650b24..0d8bf1c332 100644
+index 88e507b3c2..04c5f561cd 100644
--- a/pve-backup.c
+++ b/pve-backup.c
@@ -531,6 +531,7 @@ UuidInfo coroutine_fn *qmp_backup(
fprintf(stderr, "restore failed: %s\n", pbs_error);
return -1;
diff --git a/pve-backup.c b/pve-backup.c
-index 0d8bf1c332..8a4ecba394 100644
+index 04c5f561cd..08dfb9cbda 100644
--- a/pve-backup.c
+++ b/pve-backup.c
@@ -12,6 +12,8 @@
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/pve-backup.c b/pve-backup.c
-index 8a4ecba394..5eba2abde0 100644
+index 08dfb9cbda..79d14d6a0b 100644
--- a/pve-backup.c
+++ b/pve-backup.c
@@ -505,6 +505,11 @@ static void create_backup_jobs_bh(void *opaque) {
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/pve-backup.c b/pve-backup.c
-index 5eba2abde0..99a91f88b2 100644
+index 79d14d6a0b..67e2b99d74 100644
--- a/pve-backup.c
+++ b/pve-backup.c
@@ -318,6 +318,13 @@ static void coroutine_fn pvebackup_co_complete_stream(void *opaque)
1 file changed, 38 insertions(+), 19 deletions(-)
diff --git a/pve-backup.c b/pve-backup.c
-index 99a91f88b2..04c8ce0a3d 100644
+index 67e2b99d74..7a8240363d 100644
--- a/pve-backup.c
+++ b/pve-backup.c
@@ -356,12 +356,41 @@ static void pvebackup_complete_cb(void *opaque, int ret)
hmp_handle_error(mon, error);
}
diff --git a/pve-backup.c b/pve-backup.c
-index 04c8ce0a3d..56da408001 100644
+index 7a8240363d..cb5312fff3 100644
--- a/pve-backup.c
+++ b/pve-backup.c
@@ -57,6 +57,7 @@ static struct PVEBackupState {