]> git.proxmox.com Git - pve-qemu.git/blob - debian/patches/bitmap-mirror/0003-mirror-add-check-for-bitmap-mode-without-bitmap.patch
9b1c40bcea73d616132a524316728f05e4eb297a
[pve-qemu.git] / debian / patches / bitmap-mirror / 0003-mirror-add-check-for-bitmap-mode-without-bitmap.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
3 Date: Mon, 6 Apr 2020 12:17:05 +0200
4 Subject: [PATCH] mirror: add check for bitmap-mode without bitmap
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 as one without the other does not make much sense with the current set
10 of modes.
11
12 Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
13 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 ---
15 blockdev.c | 3 +++
16 1 file changed, 3 insertions(+)
17
18 diff --git a/blockdev.c b/blockdev.c
19 index 03e99264dc..9e14feec87 100644
20 --- a/blockdev.c
21 +++ b/blockdev.c
22 @@ -3056,6 +3056,9 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
23 if (bdrv_dirty_bitmap_check(bitmap, BDRV_BITMAP_ALLOW_RO, errp)) {
24 return;
25 }
26 + } else if (has_bitmap_mode) {
27 + error_setg(errp, "Cannot specify bitmap sync mode without a bitmap");
28 + return;
29 }
30
31 if (!has_replaces) {