summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy2017-06-28 14:05:05 +0200
committerMax Reitz2017-07-11 17:44:57 +0200
commitba06ff1a5c4d080cc8e88ec2d7c3472c20d33f1b (patch)
treea0e8f0d513132be8c01c5051eb6e4216963de0a4 /block
parenttests: add hbitmap iter test (diff)
downloadqemu-ba06ff1a5c4d080cc8e88ec2d7c3472c20d33f1b.tar.gz
qemu-ba06ff1a5c4d080cc8e88ec2d7c3472c20d33f1b.tar.xz
qemu-ba06ff1a5c4d080cc8e88ec2d7c3472c20d33f1b.zip
block: fix bdrv_dirty_bitmap_granularity signature
Make getter signature const-correct. This allows other functions with const dirty bitmap parameter use bdrv_dirty_bitmap_granularity(). Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-id: 20170628120530.31251-6-vsementsov@virtuozzo.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block')
-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 a04c6e4154..df0110cf9f 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -455,7 +455,7 @@ uint32_t bdrv_get_default_bitmap_granularity(BlockDriverState *bs)
return granularity;
}
-uint32_t bdrv_dirty_bitmap_granularity(BdrvDirtyBitmap *bitmap)
+uint32_t bdrv_dirty_bitmap_granularity(const BdrvDirtyBitmap *bitmap)
{
return BDRV_SECTOR_SIZE << hbitmap_granularity(bitmap->bitmap);
}