]> git.proxmox.com Git - pve-qemu.git/blame - debian/patches/bitmap-mirror/0004-mirror-switch-to-bdrv_dirty_bitmap_merge_internal.patch
update submodule and patches to 7.2.0
[pve-qemu.git] / debian / patches / bitmap-mirror / 0004-mirror-switch-to-bdrv_dirty_bitmap_merge_internal.patch
CommitLineData
83faa3fe 1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
059a9447 2From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
83faa3fe
TL
3Date: Mon, 6 Apr 2020 12:17:06 +0200
4Subject: [PATCH] mirror: switch to bdrv_dirty_bitmap_merge_internal
059a9447
FG
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9since sync_bitmap is busy at the point of merging, and we checked access
10beforehand.
11
12Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
ddbf7a87 13Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
059a9447 14---
8dca018b
SR
15 block/mirror.c | 11 ++++-------
16 1 file changed, 4 insertions(+), 7 deletions(-)
059a9447
FG
17
18diff --git a/block/mirror.c b/block/mirror.c
d03e1b3c 19index 35c1b8f25d..4969c6833c 100644
059a9447
FG
20--- a/block/mirror.c
21+++ b/block/mirror.c
d03e1b3c 22@@ -782,8 +782,8 @@ static int mirror_exit_common(Job *job)
059a9447
FG
23 job->ret == 0 && ret == 0)) {
24 /* Success; synchronize copy back to sync. */
25 bdrv_clear_dirty_bitmap(s->sync_bitmap, NULL);
26- bdrv_merge_dirty_bitmap(s->sync_bitmap, s->dirty_bitmap,
27- NULL, &error_abort);
28+ bdrv_dirty_bitmap_merge_internal(s->sync_bitmap, s->dirty_bitmap,
29+ NULL, true);
30 }
31 }
32 bdrv_release_dirty_bitmap(s->dirty_bitmap);
d03e1b3c 33@@ -1862,11 +1862,8 @@ static BlockJob *mirror_start_job(
059a9447
FG
34 }
35
36 if (s->sync_mode == MIRROR_SYNC_MODE_BITMAP) {
37- bdrv_merge_dirty_bitmap(s->dirty_bitmap, s->sync_bitmap,
38- NULL, &local_err);
8dca018b
SR
39- if (local_err) {
40- goto fail;
41- }
059a9447
FG
42+ bdrv_dirty_bitmap_merge_internal(s->dirty_bitmap, s->sync_bitmap,
43+ NULL, true);
8dca018b
SR
44 }
45
46 ret = block_job_add_bdrv(&s->common, "source", bs, 0,