]> git.proxmox.com Git - pve-qemu.git/blobdiff - debian/patches/bitmap-mirror/0002-drive-mirror-add-support-for-conditional-and-always-.patch
update submodule and patches to QEMU 8.2.2
[pve-qemu.git] / debian / patches / bitmap-mirror / 0002-drive-mirror-add-support-for-conditional-and-always-.patch
index a4a5a0b460d9ad64d758be58d7d26de0ae6660a6..8ff09e2184743dce822f417a219e60e6d85dc949 100644 (file)
@@ -24,10 +24,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
  1 file changed, 18 insertions(+), 6 deletions(-)
 
 diff --git a/block/mirror.c b/block/mirror.c
-index 1ff42c8af1..11b8a8e959 100644
+index ed14c8b498..beb98f2e07 100644
 --- a/block/mirror.c
 +++ b/block/mirror.c
-@@ -682,8 +682,6 @@ static int mirror_exit_common(Job *job)
+@@ -695,8 +695,6 @@ static int mirror_exit_common(Job *job)
          bdrv_unfreeze_backing_chain(mirror_top_bs, target_bs);
      }
  
@@ -36,9 +36,9 @@ index 1ff42c8af1..11b8a8e959 100644
      /* Make sure that the source BDS doesn't go away during bdrv_replace_node,
       * before we can call bdrv_drained_end */
      bdrv_ref(src);
-@@ -788,6 +786,18 @@ static int mirror_exit_common(Job *job)
-     block_job_remove_all_bdrv(bjob);
-     bdrv_replace_node(mirror_top_bs, mirror_top_bs->backing->bs, &error_abort);
+@@ -810,6 +808,18 @@ static int mirror_exit_common(Job *job)
+     bdrv_drained_end(target_bs);
+     bdrv_unref(target_bs);
  
 +    if (s->sync_bitmap) {
 +        if (s->bitmap_mode == BITMAP_SYNC_MODE_ALWAYS ||
@@ -55,7 +55,7 @@ index 1ff42c8af1..11b8a8e959 100644
      bs_opaque->job = NULL;
  
      bdrv_drained_end(src);
-@@ -1699,10 +1709,6 @@ static BlockJob *mirror_start_job(
+@@ -1776,10 +1786,6 @@ static BlockJob *mirror_start_job(
                         " sync mode",
                         MirrorSyncMode_str(sync_mode));
              return NULL;
@@ -66,7 +66,7 @@ index 1ff42c8af1..11b8a8e959 100644
          }
      } else if (bitmap) {
          error_setg(errp,
-@@ -1719,6 +1725,12 @@ static BlockJob *mirror_start_job(
+@@ -1796,6 +1802,12 @@ static BlockJob *mirror_start_job(
              return NULL;
          }
          granularity = bdrv_dirty_bitmap_granularity(bitmap);