Skip to content

Commit 4aa16db

Browse files
ebblakemdroth
authored andcommitted
dirty-bitmap: Report BlockDirtyInfo.count in bytes, as documented
We've been documenting the value in bytes since its introduction in commit b9a9b3a (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: [email protected] Signed-off-by: Eric Blake <[email protected]> Reviewed-by: John Snow <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Kevin Wolf <[email protected]> (cherry picked from commit 6c98c57) Signed-off-by: Michael Roth <[email protected]>
1 parent 27dd31f commit 4aa16db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/dirty-bitmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ BlockDirtyInfoList *bdrv_query_dirty_bitmaps(BlockDriverState *bs)
345345
QLIST_FOREACH(bm, &bs->dirty_bitmaps, list) {
346346
BlockDirtyInfo *info = g_new0(BlockDirtyInfo, 1);
347347
BlockDirtyInfoList *entry = g_new0(BlockDirtyInfoList, 1);
348-
info->count = bdrv_get_dirty_count(bm);
348+
info->count = bdrv_get_dirty_count(bm) << BDRV_SECTOR_BITS;
349349
info->granularity = bdrv_dirty_bitmap_granularity(bm);
350350
info->has_name = !!bm->name;
351351
info->name = g_strdup(bm->name);

0 commit comments

Comments
 (0)