qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PULL 15/17] block/dirty-bitmaps: prohibit removing readonl


From: John Snow
Subject: [Qemu-devel] [PULL 15/17] block/dirty-bitmaps: prohibit removing readonly bitmaps
Date: Fri, 8 Mar 2019 15:28:56 -0500

Remove is an inherently RW operation, so this will fail anyway, but
we can fail it very quickly instead of trying and failing, so do so.

Signed-off-by: John Snow <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-id: address@hidden
Signed-off-by: John Snow <address@hidden>
---
 blockdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/blockdev.c b/blockdev.c
index c6c7a64bfc..51fcfb7faf 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2882,7 +2882,8 @@ void qmp_block_dirty_bitmap_remove(const char *node, 
const char *name,
         return;
     }
 
-    if (bdrv_dirty_bitmap_check(bitmap, BDRV_BITMAP_BUSY, errp)) {
+    if (bdrv_dirty_bitmap_check(bitmap, BDRV_BITMAP_BUSY | BDRV_BITMAP_RO,
+                                errp)) {
         return;
     }
 
-- 
2.17.2




reply via email to

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