[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [RFC PATCH 05/12] qcow2-bitmap: track bitmap type
From: |
John Snow |
Subject: |
[Qemu-block] [RFC PATCH 05/12] qcow2-bitmap: track bitmap type |
Date: |
Fri, 11 May 2018 21:25:30 -0400 |
We only have one type of persistent bitmap right now, but I'd like the
qemu-img tool to be able to give good diagnostic information if it sees
an unknown/unsupported type.
We do enforce it to be the dirty tracking type in check_dir_entry, but
I wanted positive affirmation of the type in the forthcoming info script.
Signed-off-by: John Snow <address@hidden>
---
block/qcow2-bitmap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c
index b556dbdccd..60e01abfd7 100644
--- a/block/qcow2-bitmap.c
+++ b/block/qcow2-bitmap.c
@@ -83,6 +83,7 @@ typedef QSIMPLEQ_HEAD(Qcow2BitmapTableList, Qcow2BitmapTable)
typedef struct Qcow2Bitmap {
Qcow2BitmapTable table;
uint32_t flags;
+ uint8_t type;
uint8_t granularity_bits;
char *name;
@@ -608,6 +609,7 @@ static Qcow2BitmapList *bitmap_list_load(BlockDriverState
*bs, Error **errp)
bm->table.offset = e->bitmap_table_offset;
bm->table.size = e->bitmap_table_size;
bm->flags = e->flags;
+ bm->type = e->type;
bm->granularity_bits = e->granularity_bits;
bm->name = dir_entry_copy_name(e);
QSIMPLEQ_INSERT_TAIL(bm_list, bm, entry);
--
2.14.3
- Re: [Qemu-block] [Qemu-devel] [RFC PATCH 06/12] qapi: add bitmap info, (continued)
[Qemu-block] [RFC PATCH 04/12] qcow2/dirty-bitmaps: load IN_USE bitmaps if disk is RO, John Snow, 2018/05/11
[Qemu-block] [RFC PATCH 03/12] block/qcow2-bitmap: avoid adjusting bm->flags for RO bitmaps, John Snow, 2018/05/11
[Qemu-block] [RFC PATCH 05/12] qcow2-bitmap: track bitmap type,
John Snow <=
[Qemu-block] [RFC PATCH 08/12] qjson: allow caller to ask for arbitrary indent, John Snow, 2018/05/11
[Qemu-block] [RFC PATCH 07/12] qcow2-bitmap: add basic bitmaps info, John Snow, 2018/05/11
[Qemu-block] [RFC PATCH 09/12] qapi/block-core: add BitmapMapping and BitmapEntry structs, John Snow, 2018/05/11