[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v3 2/5] block/dirty-bitmaps: fix merge permissio

From: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-devel] [PATCH v3 2/5] block/dirty-bitmaps: fix merge permissions
Date: Wed, 26 Sep 2018 14:55:42 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

26.09.2018 02:49, 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.

Allow the merge to "disabled" bitmaps,
and prohibit merging to "locked" ones.

only the second part is here..

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

diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index fc10543ab0..53b7d282c4 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -806,9 +806,9 @@ void bdrv_merge_dirty_bitmap(BdrvDirtyBitmap *dest, const 
BdrvDirtyBitmap *src,
qemu_mutex_lock(dest->mutex); - if (bdrv_dirty_bitmap_frozen(dest)) {
-        error_setg(errp, "Bitmap '%s' is frozen and cannot be modified",
-                   dest->name);
+    if (!bdrv_dirty_bitmap_user_modifiable(dest)) {
+        error_setg(errp, "Bitmap '%s' is currently in-use by another"
+        " operation and cannot be modified", dest->name);
          goto out;

Best regards,

reply via email to

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