Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37736117
en ru br
Репозитории ALT

Группа :: Эмуляторы
Пакет: pve-qemu

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: 0004-mirror-switch-to-bdrv_dirty_bitmap_merge_internal.patch
Скачать


From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Mon, 6 Apr 2020 12:17:06 +0200
Subject: [PATCH] mirror: switch to bdrv_dirty_bitmap_merge_internal
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
since sync_bitmap is busy at the point of merging, and we checked access
beforehand.
Signed-off-by: Fabian Grц╪nbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
 block/mirror.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/block/mirror.c b/block/mirror.c
index c688726fae..a7f829f766 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -787,8 +787,8 @@ static int mirror_exit_common(Job *job)
              job->ret == 0 && ret == 0)) {
             /* Success; synchronize copy back to sync. */
             bdrv_clear_dirty_bitmap(s->sync_bitmap, NULL);
-            bdrv_merge_dirty_bitmap(s->sync_bitmap, s->dirty_bitmap,
-                                    NULL, &error_abort);
+            bdrv_dirty_bitmap_merge_internal(s->sync_bitmap, s->dirty_bitmap,
+                                             NULL, true);
         }
     }
     bdrv_release_dirty_bitmap(s->dirty_bitmap);
@@ -1835,11 +1835,8 @@ static BlockJob *mirror_start_job(
     }
 
     if (s->sync_mode == MIRROR_SYNC_MODE_BITMAP) {
-        bdrv_merge_dirty_bitmap(s->dirty_bitmap, s->sync_bitmap,
-                                NULL, &local_err);
-        if (local_err) {
-            goto fail;
-        }
+        bdrv_dirty_bitmap_merge_internal(s->dirty_bitmap, s->sync_bitmap,
+                                         NULL, true);
     }
 
     ret = block_job_add_bdrv(&s->common, "source", bs, 0,
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin