]> git.proxmox.com Git - pve-qemu.git/blame - debian/patches/pve/0033-mirror-switch-to-bdrv_dirty_bitmap_merge_internal.patch
clean up pve/ patches by squashing patches of patches
[pve-qemu.git] / debian / patches / pve / 0033-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>
13---
14 block/mirror.c | 8 ++++----
15 1 file changed, 4 insertions(+), 4 deletions(-)
16
17diff --git a/block/mirror.c b/block/mirror.c
817b7667 18index d1cce079da..e6140cf018 100644
059a9447
FG
19--- a/block/mirror.c
20+++ b/block/mirror.c
817b7667 21@@ -759,8 +759,8 @@ static int mirror_exit_common(Job *job)
059a9447
FG
22 job->ret == 0 && ret == 0)) {
23 /* Success; synchronize copy back to sync. */
24 bdrv_clear_dirty_bitmap(s->sync_bitmap, NULL);
25- bdrv_merge_dirty_bitmap(s->sync_bitmap, s->dirty_bitmap,
26- NULL, &error_abort);
27+ bdrv_dirty_bitmap_merge_internal(s->sync_bitmap, s->dirty_bitmap,
28+ NULL, true);
29 }
30 }
31 bdrv_release_dirty_bitmap(s->dirty_bitmap);
817b7667 32@@ -1793,8 +1793,8 @@ static BlockJob *mirror_start_job(
059a9447
FG
33 }
34
35 if (s->sync_mode == MIRROR_SYNC_MODE_BITMAP) {
36- bdrv_merge_dirty_bitmap(s->dirty_bitmap, s->sync_bitmap,
37- NULL, &local_err);
38+ bdrv_dirty_bitmap_merge_internal(s->dirty_bitmap, s->sync_bitmap,
39+ NULL, true);
40 if (local_err) {
41 goto fail;
42 }