[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v10 18/20] qcow2: Switch store_bitmap_data() to
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [PATCH v10 18/20] qcow2: Switch store_bitmap_data() to byte-based iteration |
Date: |
Tue, 26 Sep 2017 09:30:14 +0800 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
On Mon, 09/25 09:55, Eric Blake wrote:
> 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 <address@hidden>
> Reviewed-by: Vladimir Sementsov-Ogievskiy<address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
- [Qemu-block] [PATCH v10 11/20] dirty-bitmap: Change bdrv_dirty_iter_next() to report byte offset, (continued)
- [Qemu-block] [PATCH v10 11/20] dirty-bitmap: Change bdrv_dirty_iter_next() to report byte offset, Eric Blake, 2017/09/25
- [Qemu-block] [PATCH v10 12/20] dirty-bitmap: Change bdrv_get_dirty_count() to report bytes, Eric Blake, 2017/09/25
- [Qemu-block] [PATCH v10 13/20] dirty-bitmap: Change bdrv_get_dirty_locked() to take bytes, Eric Blake, 2017/09/25
- [Qemu-block] [PATCH v10 15/20] mirror: Switch mirror_dirty_init() to byte-based iteration, Eric Blake, 2017/09/25
- [Qemu-block] [PATCH v10 14/20] dirty-bitmap: Change bdrv_[re]set_dirty_bitmap() to use bytes, Eric Blake, 2017/09/25
- [Qemu-block] [PATCH v10 16/20] qcow2: Switch qcow2_measure() to byte-based iteration, Eric Blake, 2017/09/25
- [Qemu-block] [PATCH v10 17/20] qcow2: Switch load_bitmap_data() to byte-based iteration, Eric Blake, 2017/09/25
- [Qemu-block] [PATCH v10 18/20] qcow2: Switch store_bitmap_data() to byte-based iteration, Eric Blake, 2017/09/25
- [Qemu-block] [PATCH v10 19/20] dirty-bitmap: Switch bdrv_set_dirty() to bytes, Eric Blake, 2017/09/25
- [Qemu-block] [PATCH v10 20/20] dirty-bitmap: Convert internal hbitmap size/granularity, Eric Blake, 2017/09/25
- Re: [Qemu-block] [Qemu-devel] [PATCH v10 00/20] make dirty-bitmap byte-based, John Snow, 2017/09/25