]> git.proxmox.com Git - pve-qemu.git/commitdiff
PVE backup: don't call no_co_wrapper function from coroutine
authorFiona Ebner <f.ebner@proxmox.com>
Mon, 15 May 2023 13:39:55 +0000 (15:39 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 22 May 2023 13:09:14 +0000 (15:09 +0200)
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@proxmox.com>
15 files changed:
debian/patches/pve/0029-PVE-Backup-proxmox-backup-patches-for-qemu.patch
debian/patches/pve/0031-PVE-Backup-Add-dirty-bitmap-tracking-for-incremental.patch
debian/patches/pve/0032-PVE-various-PBS-fixes.patch
debian/patches/pve/0034-PVE-add-query_proxmox_support-QMP-command.patch
debian/patches/pve/0035-PVE-add-query-pbs-bitmap-info-QMP-call.patch
debian/patches/pve/0038-PVE-Backup-Use-a-transaction-to-synchronize-job-stat.patch
debian/patches/pve/0039-PVE-Backup-Don-t-block-on-finishing-and-cleanup-crea.patch
debian/patches/pve/0040-PVE-Migrate-dirty-bitmap-state-via-savevm.patch
debian/patches/pve/0043-PVE-Use-coroutine-QMP-for-backup-cancel_backup.patch
debian/patches/pve/0044-PBS-add-master-key-support.patch
debian/patches/pve/0052-pbs-namespace-support.patch
debian/patches/pve/0056-PVE-Backup-create-jobs-correctly-cancel-in-error-sce.patch
debian/patches/pve/0057-PVE-Backup-ensure-jobs-in-di_list-are-referenced.patch
debian/patches/pve/0058-PVE-Backup-avoid-segfault-issues-upon-backup-cancel.patch
debian/patches/pve/0062-PVE-Backup-allow-passing-max-workers-performance-set.patch

index 268f13b3abe004f9bfe3cac14a31957230c3fb08..3aae91f894bf260cc152bf470b81287f4097a791 100644 (file)
@@ -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;
index 082241a894583ea947ac922fc87c1296317e8502..1708021dce67d8269ee1e5d325170550949a340b 100644 (file)
@@ -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 @@
index a5d7a0257354f0fff1b451f25d3351d96a695721..c46a30753acb93097d5351666b9dc5107a80a1c5 100644 (file)
@@ -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 @@
index 60ba5dd0e6ae98cbecee0f1235a9010b2a81c318..0b14e6fe197765c8b389aa7aab34baebd9801ec8 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Stefan Reiter <s.reiter@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)
index cd76e86f1e9713bd995268c429e4bec11800e023..2e0f2357a13bfb335e6e433829e5fd946a6c1c7d 100644 (file)
@@ -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;
index 3a6b4d3a6d15e57e0d43e5df3568bb6102914f46..7a5cda5ccf67aa00d97d4b9655beb901189aa16d 100644 (file)
@@ -20,7 +20,7 @@ Signed-off-by: Fiona Ebner <f.ebner@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 {
index 7f2f9458437003ddc383cedc95c74d08fe86050a..15eb1907cc75b97c4dda48009cc5d7d120a51a4e 100644 (file)
@@ -57,7 +57,7 @@ Signed-off-by: Fiona Ebner <f.ebner@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";
index 2c86cb2d55f9d162a49e23a384129e1bd19c93dc..644afc27b97fddbd3188be36f367e88830302355 100644 (file)
@@ -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)
index 21ca3a5baf242b576c9795029890696eb33f7e47..b38c6334f5f5b3bc40d836e3645e794d124b47b0 100644 (file)
@@ -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);
index cdcf7dbf1fdced39b7d577e4d08efe584f5102bf..4498723fd1eb7559288e681965b69772cebbcd59 100644 (file)
@@ -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(
index d8d730ba8e4695f099e10bf60ac1870ca225c6be..b0bb9a6aba69db4ecf21ad78fb9c40c1df134f29 100644 (file)
@@ -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 @@
index 03f6a066920b0089438b63ec378a50505dd4d330..5dee7461140d049544809a9c480376f1e3c74a06 100644 (file)
@@ -21,7 +21,7 @@ Signed-off-by: Fiona Ebner <f.ebner@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) {
index 7addf0909d3d7506b40fdc6f5fb6724a1aa52ec9..4beed9763f31f877a8d41d6555d26c30b3fc8103 100644 (file)
@@ -23,7 +23,7 @@ Signed-off-by: Fiona Ebner <f.ebner@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)
index f386f72b91e74617339c178a585a76090d703cce..68c261e8aeff433d934f75cec3f66286c6153312 100644 (file)
@@ -39,7 +39,7 @@ Signed-off-by: Fiona Ebner <f.ebner@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)
index 1aece72730e0fe64ed429c214b61b2aa8f9acd22..8fd63c0f9907e6dd3c6472a7790b377b642f86bd 100644 (file)
@@ -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 {