[pve-devel] [PATCH v2 qemu 6/7] PVE backup: don't call no_co_wrapper function from coroutine
Fiona Ebner
f.ebner at proxmox.com
Mon May 15 15:39:55 CEST 2023
Namely, pvebackup_co_prepare() needs to call bdrv_co_open() rather
than bdrv_open(), because it is a coroutine itself.
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
No changes in v2.
Sorry that this is not already in the rebase patch, didn't notice
earlier, because this is only in the BACKUP_FORMAT_DIR case.
This is what I mean with there are too many backup-related patches ;)
.../pve/0029-PVE-Backup-proxmox-backup-patches-for-qemu.patch | 4 ++--
...PVE-Backup-Add-dirty-bitmap-tracking-for-incremental.patch | 2 +-
debian/patches/pve/0032-PVE-various-PBS-fixes.patch | 2 +-
.../pve/0034-PVE-add-query_proxmox_support-QMP-command.patch | 2 +-
.../pve/0035-PVE-add-query-pbs-bitmap-info-QMP-call.patch | 4 ++--
...PVE-Backup-Use-a-transaction-to-synchronize-job-stat.patch | 2 +-
...PVE-Backup-Don-t-block-on-finishing-and-cleanup-crea.patch | 2 +-
.../pve/0040-PVE-Migrate-dirty-bitmap-state-via-savevm.patch | 2 +-
.../0043-PVE-Use-coroutine-QMP-for-backup-cancel_backup.patch | 4 ++--
debian/patches/pve/0044-PBS-add-master-key-support.patch | 2 +-
debian/patches/pve/0052-pbs-namespace-support.patch | 2 +-
...PVE-Backup-create-jobs-correctly-cancel-in-error-sce.patch | 2 +-
...057-PVE-Backup-ensure-jobs-in-di_list-are-referenced.patch | 2 +-
...-PVE-Backup-avoid-segfault-issues-upon-backup-cancel.patch | 2 +-
...PVE-Backup-allow-passing-max-workers-performance-set.patch | 2 +-
15 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/debian/patches/pve/0029-PVE-Backup-proxmox-backup-patches-for-qemu.patch b/debian/patches/pve/0029-PVE-Backup-proxmox-backup-patches-for-qemu.patch
index 268f13b..3aae91f 100644
--- a/debian/patches/pve/0029-PVE-Backup-proxmox-backup-patches-for-qemu.patch
+++ b/debian/patches/pve/0029-PVE-Backup-proxmox-backup-patches-for-qemu.patch
@@ -510,7 +510,7 @@ index 0000000000..1dda8b7d8f
+#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 @@
@@ -1253,7 +1253,7 @@ index 0000000000..389d6c84a0
+ 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/debian/patches/pve/0031-PVE-Backup-Add-dirty-bitmap-tracking-for-incremental.patch b/debian/patches/pve/0031-PVE-Backup-Add-dirty-bitmap-tracking-for-incremental.patch
index 082241a..1708021 100644
--- a/debian/patches/pve/0031-PVE-Backup-Add-dirty-bitmap-tracking-for-incremental.patch
+++ b/debian/patches/pve/0031-PVE-Backup-Add-dirty-bitmap-tracking-for-incremental.patch
@@ -132,7 +132,7 @@ index 1dda8b7d8f..8cbf645b2c 100644
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 @@
diff --git a/debian/patches/pve/0032-PVE-various-PBS-fixes.patch b/debian/patches/pve/0032-PVE-various-PBS-fixes.patch
index a5d7a02..c46a307 100644
--- a/debian/patches/pve/0032-PVE-various-PBS-fixes.patch
+++ b/debian/patches/pve/0032-PVE-various-PBS-fixes.patch
@@ -36,7 +36,7 @@ index cda5de792b..ecbebd39ac 100644
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 @@
diff --git a/debian/patches/pve/0034-PVE-add-query_proxmox_support-QMP-command.patch b/debian/patches/pve/0034-PVE-add-query_proxmox_support-QMP-command.patch
index 60ba5dd..0b14e6f 100644
--- a/debian/patches/pve/0034-PVE-add-query_proxmox_support-QMP-command.patch
+++ b/debian/patches/pve/0034-PVE-add-query_proxmox_support-QMP-command.patch
@@ -16,7 +16,7 @@ Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
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)
diff --git a/debian/patches/pve/0035-PVE-add-query-pbs-bitmap-info-QMP-call.patch b/debian/patches/pve/0035-PVE-add-query-pbs-bitmap-info-QMP-call.patch
index cd76e86..2e0f235 100644
--- a/debian/patches/pve/0035-PVE-add-query-pbs-bitmap-info-QMP-call.patch
+++ b/debian/patches/pve/0035-PVE-add-query-pbs-bitmap-info-QMP-call.patch
@@ -69,7 +69,7 @@ index 087161a967..9a67e544ce 100644
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 {
@@ -255,7 +255,7 @@ index 9eb8645e63..2db35f90e0 100644
+ 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;
diff --git a/debian/patches/pve/0038-PVE-Backup-Use-a-transaction-to-synchronize-job-stat.patch b/debian/patches/pve/0038-PVE-Backup-Use-a-transaction-to-synchronize-job-stat.patch
index 3a6b4d3..7a5cda5 100644
--- a/debian/patches/pve/0038-PVE-Backup-Use-a-transaction-to-synchronize-job-stat.patch
+++ b/debian/patches/pve/0038-PVE-Backup-Use-a-transaction-to-synchronize-job-stat.patch
@@ -20,7 +20,7 @@ Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
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 {
diff --git a/debian/patches/pve/0039-PVE-Backup-Don-t-block-on-finishing-and-cleanup-crea.patch b/debian/patches/pve/0039-PVE-Backup-Don-t-block-on-finishing-and-cleanup-crea.patch
index 7f2f945..15eb190 100644
--- a/debian/patches/pve/0039-PVE-Backup-Don-t-block-on-finishing-and-cleanup-crea.patch
+++ b/debian/patches/pve/0039-PVE-Backup-Don-t-block-on-finishing-and-cleanup-crea.patch
@@ -57,7 +57,7 @@ Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
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";
diff --git a/debian/patches/pve/0040-PVE-Migrate-dirty-bitmap-state-via-savevm.patch b/debian/patches/pve/0040-PVE-Migrate-dirty-bitmap-state-via-savevm.patch
index 2c86cb2..644afc2 100644
--- a/debian/patches/pve/0040-PVE-Migrate-dirty-bitmap-state-via-savevm.patch
+++ b/debian/patches/pve/0040-PVE-Migrate-dirty-bitmap-state-via-savevm.patch
@@ -175,7 +175,7 @@ index 0000000000..887e998b9e
+ 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)
diff --git a/debian/patches/pve/0043-PVE-Use-coroutine-QMP-for-backup-cancel_backup.patch b/debian/patches/pve/0043-PVE-Use-coroutine-QMP-for-backup-cancel_backup.patch
index 21ca3a5..b38c633 100644
--- a/debian/patches/pve/0043-PVE-Use-coroutine-QMP-for-backup-cancel_backup.patch
+++ b/debian/patches/pve/0043-PVE-Use-coroutine-QMP-for-backup-cancel_backup.patch
@@ -119,7 +119,7 @@ index 4ce7bc0b5e..0923037dec 100644
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) {
@@ -423,7 +423,7 @@ index e9264e5025..4536650b24 100644
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);
diff --git a/debian/patches/pve/0044-PBS-add-master-key-support.patch b/debian/patches/pve/0044-PBS-add-master-key-support.patch
index cdcf7db..4498723 100644
--- a/debian/patches/pve/0044-PBS-add-master-key-support.patch
+++ b/debian/patches/pve/0044-PBS-add-master-key-support.patch
@@ -33,7 +33,7 @@ index 56f39b14d4..f852c70611 100644
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(
diff --git a/debian/patches/pve/0052-pbs-namespace-support.patch b/debian/patches/pve/0052-pbs-namespace-support.patch
index d8d730b..b0bb9a6 100644
--- a/debian/patches/pve/0052-pbs-namespace-support.patch
+++ b/debian/patches/pve/0052-pbs-namespace-support.patch
@@ -172,7 +172,7 @@ index 2f834cf42e..f03d9bab8d 100644
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 @@
diff --git a/debian/patches/pve/0056-PVE-Backup-create-jobs-correctly-cancel-in-error-sce.patch b/debian/patches/pve/0056-PVE-Backup-create-jobs-correctly-cancel-in-error-sce.patch
index 03f6a06..5dee746 100644
--- a/debian/patches/pve/0056-PVE-Backup-create-jobs-correctly-cancel-in-error-sce.patch
+++ b/debian/patches/pve/0056-PVE-Backup-create-jobs-correctly-cancel-in-error-sce.patch
@@ -21,7 +21,7 @@ Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
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) {
diff --git a/debian/patches/pve/0057-PVE-Backup-ensure-jobs-in-di_list-are-referenced.patch b/debian/patches/pve/0057-PVE-Backup-ensure-jobs-in-di_list-are-referenced.patch
index 7addf09..4beed97 100644
--- a/debian/patches/pve/0057-PVE-Backup-ensure-jobs-in-di_list-are-referenced.patch
+++ b/debian/patches/pve/0057-PVE-Backup-ensure-jobs-in-di_list-are-referenced.patch
@@ -23,7 +23,7 @@ Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
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)
diff --git a/debian/patches/pve/0058-PVE-Backup-avoid-segfault-issues-upon-backup-cancel.patch b/debian/patches/pve/0058-PVE-Backup-avoid-segfault-issues-upon-backup-cancel.patch
index f386f72..68c261e 100644
--- a/debian/patches/pve/0058-PVE-Backup-avoid-segfault-issues-upon-backup-cancel.patch
+++ b/debian/patches/pve/0058-PVE-Backup-avoid-segfault-issues-upon-backup-cancel.patch
@@ -39,7 +39,7 @@ Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
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)
diff --git a/debian/patches/pve/0062-PVE-Backup-allow-passing-max-workers-performance-set.patch b/debian/patches/pve/0062-PVE-Backup-allow-passing-max-workers-performance-set.patch
index 1aece72..8fd63c0 100644
--- a/debian/patches/pve/0062-PVE-Backup-allow-passing-max-workers-performance-set.patch
+++ b/debian/patches/pve/0062-PVE-Backup-allow-passing-max-workers-performance-set.patch
@@ -46,7 +46,7 @@ index ac23f21eef..636509b83e 100644
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 {
--
2.39.2
More information about the pve-devel
mailing list