[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] dirty-bitmaps: allow merging to disabled bitmap

From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] dirty-bitmaps: allow merging to disabled bitmaps
Date: Wed, 19 Sep 2018 16:08:18 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

On 9/19/18 2:58 PM, John Snow wrote:
We wish to prohibit merging to read-only bitmaps and frozen bitmaps,
but "disabled" bitmaps only preclude their recording of live, new
information. It does not prohibit them from manual writes at the behest
of the user, as is the case for merge operations.

Reported-by: Eric Blake <address@hidden>
Signed-off-by: John Snow <address@hidden>
  block/dirty-bitmap.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

I can add this to my NBD queue, if desired.

diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index c9b8a6fd52..fa7e75e0af 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -798,7 +798,7 @@ void bdrv_merge_dirty_bitmap(BdrvDirtyBitmap *dest, const 
BdrvDirtyBitmap *src,
qemu_mutex_lock(dest->mutex); - assert(bdrv_dirty_bitmap_enabled(dest));
+    assert(!bdrv_dirty_bitmap_frozen(dest));
if (!hbitmap_merge(dest->bitmap, src->bitmap)) {

Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]