aboutsummaryrefslogtreecommitdiff
path: root/block/dirty-bitmap.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2017-09-25 09:55:12 -0500
committerKevin Wolf <kwolf@redhat.com>2017-10-06 16:28:58 +0200
commitebfcd2e75f719c5d74ba72bbca84fa9854b6698f (patch)
tree792c2a954aa93b0adb8863e5b5fba645f25d52b7 /block/dirty-bitmap.c
parent1b6cc579ded4f9d7923d9d59147512edd623f4c0 (diff)
dirty-bitmap: Change bdrv_dirty_bitmap_size() to report bytes
We're already reporting bytes for bdrv_dirty_bitmap_granularity(); mixing bytes and sectors in our return values is a recipe for confusion. A later cleanup will convert dirty bitmap internals to be entirely byte-based, but in the meantime, we should report the bitmap size in bytes. The only external caller in qcow2-bitmap.c is temporarily more verbose (because it is still using sector-based math), but will later be switched to track progress by bytes instead of sectors. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/dirty-bitmap.c')
-rw-r--r--block/dirty-bitmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index ee164fb518..755555af32 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -175,7 +175,7 @@ void bdrv_release_meta_dirty_bitmap(BdrvDirtyBitmap *bitmap)
int64_t bdrv_dirty_bitmap_size(const BdrvDirtyBitmap *bitmap)
{
- return bitmap->size;
+ return bitmap->size * BDRV_SECTOR_SIZE;
}
const char *bdrv_dirty_bitmap_name(const BdrvDirtyBitmap *bitmap)