diff options
author | Eric Blake <eblake@redhat.com> | 2017-09-25 09:55:24 -0500 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-10-06 16:28:58 +0200 |
commit | 49d741b5041b79214db58f364cebe2f367517711 (patch) | |
tree | ed74cc93cfcbf73fc4e9044ba9c48f883315b388 /qga | |
parent | ab94db6f7609e562b5f68cc71807d5d50e24e224 (diff) |
qcow2: Switch store_bitmap_data() to byte-based iteration
Now that we have adjusted the majority of the calls this function
makes to be byte-based, it is easier to read the code if it makes
passes over the image using bytes rather than sectors.
iotests 165 was rather weak - on a default 64k-cluster image, where
bitmap granularity also defaults to 64k bytes, a single cluster of
the bitmap table thus covers (64*1024*8) bits which each cover 64k
bytes, or 32G of image space. But the test only uses a 1G image,
so it cannot trigger any more than one loop of the code in
store_bitmap_data(); and it was writing to the first cluster. In
order to test that we are properly aligning which portions of the
bitmap are being written to the file, we really want to test a case
where the first dirty bit returned by bdrv_dirty_iter_next() is not
aligned to the start of a cluster, which we can do by modifying the
test to write data that doesn't happen to fall in the first cluster
of the image.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qga')
0 files changed, 0 insertions, 0 deletions