[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 2/5] dirty-bitmap: Report BlockDirtyInfo.count in byt
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 2/5] dirty-bitmap: Report BlockDirtyInfo.count in bytes, as documented |
Date: |
Mon, 24 Jul 2017 16:32:07 +0200 |
From: Eric Blake <address@hidden>
We've been documenting the value in bytes since its introduction
in commit b9a9b3a4 (v1.3), where it was actually reported in bytes.
Commit e4654d2 (v2.0) then removed things from block/qapi.c, in
preparation for a rewrite to a list of dirty sectors in the next
commit 21b5683 in block.c, but the new code mistakenly started
reporting in sectors.
Fixes: https://bugzilla.redhat.com/1441460
CC: address@hidden
Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: John Snow <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/dirty-bitmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index 543bddb..30462d4 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -461,7 +461,7 @@ BlockDirtyInfoList
*bdrv_query_dirty_bitmaps(BlockDriverState *bs)
QLIST_FOREACH(bm, &bs->dirty_bitmaps, list) {
BlockDirtyInfo *info = g_new0(BlockDirtyInfo, 1);
BlockDirtyInfoList *entry = g_new0(BlockDirtyInfoList, 1);
- info->count = bdrv_get_dirty_count(bm);
+ info->count = bdrv_get_dirty_count(bm) << BDRV_SECTOR_BITS;
info->granularity = bdrv_dirty_bitmap_granularity(bm);
info->has_name = !!bm->name;
info->name = g_strdup(bm->name);
--
1.8.3.1
- [Qemu-devel] [PULL 0/5] Block layer patches for 2.10.0-rc0, Kevin Wolf, 2017/07/24
- [Qemu-devel] [PULL 3/5] qcow2: Fix sector calculation in qcow2_measure(), Kevin Wolf, 2017/07/24
- [Qemu-devel] [PULL 2/5] dirty-bitmap: Report BlockDirtyInfo.count in bytes, as documented,
Kevin Wolf <=
- [Qemu-devel] [PULL 1/5] iotests: Remove a few tests from 'quick' group, Kevin Wolf, 2017/07/24
- [Qemu-devel] [PULL 5/5] qemu-iotests: Avoid unnecessary sleeps, Kevin Wolf, 2017/07/24
- [Qemu-devel] [PULL 4/5] block: Skip implicit nodes in query-block/blockstats, Kevin Wolf, 2017/07/24
- Re: [Qemu-devel] [PULL 0/5] Block layer patches for 2.10.0-rc0, Peter Maydell, 2017/07/24