]> git.proxmox.com Git - pve-qemu.git/commitdiff
fix checks for drive mirror with bitmap
authorFiona Ebner <f.ebner@proxmox.com>
Thu, 15 Jun 2023 11:39:00 +0000 (13:39 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 15 Jun 2023 11:55:22 +0000 (13:55 +0200)
The QAPI change for QEMU 8.0 dropped redundant has_foo parameters, but
in the blockdev_mirror_common() function (which is not part of the
QAPI itself but called from there) the argument pair was has_bitmap
and bitmap_name rather than has_bitmap and bitmap.

Reported-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
debian/patches/bitmap-mirror/0001-drive-mirror-add-support-for-sync-bitmap-mode-never.patch
debian/patches/bitmap-mirror/0003-mirror-add-check-for-bitmap-mode-without-bitmap.patch
debian/patches/bitmap-mirror/0006-mirror-move-some-checks-to-qmp.patch
debian/patches/pve/0030-PVE-Backup-Proxmox-backup-patches-for-QEMU.patch

index a45ee6eeefcfbe176b7fd280b2ec28d998984b9d..4d9b8b96b1a5b24f3b970a9744c9fa2bca221c65 100644 (file)
@@ -254,7 +254,7 @@ index 663e2b7002..9099c75992 100644
                       errp);
      if (!job) {
 diff --git a/blockdev.c b/blockdev.c
-index e464daea58..1010b60804 100644
+index e464daea58..50e4a9c682 100644
 --- a/blockdev.c
 +++ b/blockdev.c
 @@ -2942,6 +2942,9 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
@@ -279,7 +279,7 @@ index e464daea58..1010b60804 100644
          sync = MIRROR_SYNC_MODE_FULL;
      }
  
-+    if (bitmap) {
++    if (bitmap_name) {
 +        if (granularity) {
 +            error_setg(errp, "Granularity and bitmap cannot both be set");
 +            return;
index e1cd354f39d8b033b8e2449258d75126c9219163..302bbc5e4b3dbccd3268e583bdc367db7284d256 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
  1 file changed, 3 insertions(+)
 
 diff --git a/blockdev.c b/blockdev.c
-index 1010b60804..19f490fce7 100644
+index 50e4a9c682..e6b2b1e338 100644
 --- a/blockdev.c
 +++ b/blockdev.c
 @@ -3036,6 +3036,9 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
index 7dc188b377bc4d0c6dfe4e8514ac410a4ad418f3..5298342c3e37dce748d696ffa485555c6700a70c 100644 (file)
@@ -62,7 +62,7 @@ index f42953837b..8f79efaa87 100644
  
          if (bitmap_mode != BITMAP_SYNC_MODE_NEVER) {
 diff --git a/blockdev.c b/blockdev.c
-index 19f490fce7..9a010f3a86 100644
+index e6b2b1e338..bdae211a54 100644
 --- a/blockdev.c
 +++ b/blockdev.c
 @@ -3015,7 +3015,36 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
@@ -72,7 +72,7 @@ index 19f490fce7..9a010f3a86 100644
 +    if ((sync == MIRROR_SYNC_MODE_BITMAP) ||
 +        (sync == MIRROR_SYNC_MODE_INCREMENTAL)) {
 +        /* done before desugaring 'incremental' to print the right message */
-+        if (!bitmap) {
++        if (!bitmap_name) {
 +            error_setg(errp, "Must provide a valid bitmap name for "
 +                       "'%s' sync mode", MirrorSyncMode_str(sync));
 +            return;
@@ -93,7 +93,7 @@ index 19f490fce7..9a010f3a86 100644
 +        bitmap_mode = BITMAP_SYNC_MODE_ON_SUCCESS;
 +    }
 +
-     if (bitmap) {
+     if (bitmap_name) {
 +        if (sync != MIRROR_SYNC_MODE_BITMAP) {
 +            error_setg(errp, "Sync mode '%s' not supported with bitmap.",
 +                       MirrorSyncMode_str(sync));
index 5049256633e0c4c54e3aeec0248fa825ae2360dc..3753eff9c82aae5333d64244b11ef61009d1e7a3 100644 (file)
@@ -166,7 +166,7 @@ index ca2599de44..636509b83e 100644
 +    hmp_handle_error(mon, error);
 +}
 diff --git a/blockdev.c b/blockdev.c
-index 9a010f3a86..b9505c95d3 100644
+index bdae211a54..315a27fc09 100644
 --- a/blockdev.c
 +++ b/blockdev.c
 @@ -37,6 +37,7 @@