[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 16/17] block/dirty-bitmaps: disallow busy bitmaps as
From: |
John Snow |
Subject: |
[Qemu-devel] [PULL 16/17] block/dirty-bitmaps: disallow busy bitmaps as merge source |
Date: |
Fri, 8 Mar 2019 15:28:57 -0500 |
We didn't do any state checking on source bitmaps at all,
so this adds inconsistent and busy checks. readonly is
allowed, so you can still copy a readonly bitmap to a new
destination to use it for operations like drive-backup.
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>
---
block/dirty-bitmap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index 6b6fed1363..59c403c3fd 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -824,6 +824,9 @@ void bdrv_merge_dirty_bitmap(BdrvDirtyBitmap *dest, const
BdrvDirtyBitmap *src,
goto out;
}
+ if (bdrv_dirty_bitmap_check(src, BDRV_BITMAP_ALLOW_RO, errp)) {
+ goto out;
+ }
if (!hbitmap_can_merge(dest->bitmap, src->bitmap)) {
error_setg(errp, "Bitmaps are incompatible and can't be merged");
--
2.17.2
- [Qemu-devel] [PULL 04/17] block/dirty-bitmap: change semantics of enabled predicate, (continued)
- [Qemu-devel] [PULL 04/17] block/dirty-bitmap: change semantics of enabled predicate, John Snow, 2019/03/08
- [Qemu-devel] [PULL 02/17] block/dirty-bitmaps: rename frozen predicate helper, John Snow, 2019/03/08
- [Qemu-devel] [PULL 05/17] nbd: change error checking order for bitmaps, John Snow, 2019/03/08
- [Qemu-devel] [PULL 14/17] block/dirty-bitmaps: prohibit readonly bitmaps for backups, John Snow, 2019/03/08
- [Qemu-devel] [PULL 12/17] block/dirty-bitmap: add inconsistent status, John Snow, 2019/03/08
- [Qemu-devel] [PULL 13/17] block/dirty-bitmaps: add block_dirty_bitmap_check function, John Snow, 2019/03/08
- [Qemu-devel] [PULL 06/17] block/dirty-bitmap: explicitly lock bitmaps with successors, John Snow, 2019/03/08
- [Qemu-devel] [PULL 08/17] block/dirty-bitmaps: move comment block, John Snow, 2019/03/08
- [Qemu-devel] [PULL 09/17] blockdev: remove unused paio parameter documentation, John Snow, 2019/03/08
- [Qemu-devel] [PULL 07/17] block/dirty-bitmaps: unify qmp_locked and user_locked calls, John Snow, 2019/03/08
- [Qemu-devel] [PULL 16/17] block/dirty-bitmaps: disallow busy bitmaps as merge source,
John Snow <=
- [Qemu-devel] [PULL 15/17] block/dirty-bitmaps: prohibit removing readonly bitmaps, John Snow, 2019/03/08
- [Qemu-devel] [PULL 11/17] block/dirty-bitmaps: add inconsistent bit, John Snow, 2019/03/08
- [Qemu-devel] [PULL 10/17] iotests: add busy/recording bit test to 124, John Snow, 2019/03/08
- [Qemu-devel] [PULL 17/17] block/dirty-bitmaps: implement inconsistent bit, John Snow, 2019/03/08
- Re: [Qemu-devel] [PULL 00/17] Bitmaps patches, no-reply, 2019/03/08
- Re: [Qemu-devel] [PULL 00/17] Bitmaps patches, no-reply, 2019/03/08
- Re: [Qemu-devel] [PULL 00/17] Bitmaps patches, no-reply, 2019/03/08
- Re: [Qemu-devel] [PULL 00/17] Bitmaps patches, Eric Blake, 2019/03/08