[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 14/18] qcow2: Switch qcow2_measure() to byte-
From: |
John Snow |
Subject: |
Re: [Qemu-devel] [PATCH v5 14/18] qcow2: Switch qcow2_measure() to byte-based iteration |
Date: |
Thu, 13 Jul 2017 14:49:14 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 07/12/2017 09:05 PM, Eric Blake wrote:
> This is new code, but it is easier to read if it makes passes over
> the image using bytes rather than sectors (and will get easier in
> the future when bdrv_get_block_status is converted to byte-based).
>
> While at it, fix a bug in the computation of nb_sectors using MAX
> rather than MIN and thus always passing INT_MAX (thankfully, the
> bug was harmless, as bdrv_get_block_status_above() clamps its
> answers according to image size).
>
Well, unless ssize was >= 2^40, and then it wouldn't have chosen
INT_MAX, right!?
> Signed-off-by: Eric Blake <address@hidden>
>
Reviewed-by: John Snow <address@hidden>
- [Qemu-devel] [PATCH v5 07/18] qcow2: Switch sectors_covered_by_bitmap_cluster() to byte-based, (continued)
- [Qemu-devel] [PATCH v5 07/18] qcow2: Switch sectors_covered_by_bitmap_cluster() to byte-based, Eric Blake, 2017/07/12
- [Qemu-devel] [PATCH v5 08/18] dirty-bitmap: Set iterator start by offset, not sector, Eric Blake, 2017/07/12
- [Qemu-devel] [PATCH v5 09/18] dirty-bitmap: Change bdrv_dirty_iter_next() to report byte offset, Eric Blake, 2017/07/12
- [Qemu-devel] [PATCH v5 06/18] dirty-bitmap: Change bdrv_dirty_bitmap_*serialize*() to take bytes, Eric Blake, 2017/07/12
- [Qemu-devel] [PATCH v5 10/18] dirty-bitmap: Change bdrv_get_dirty_count() to report bytes, Eric Blake, 2017/07/12
- [Qemu-devel] [PATCH v5 11/18] dirty-bitmap: Change bdrv_get_dirty_locked() to take bytes, Eric Blake, 2017/07/12
- [Qemu-devel] [PATCH v5 12/18] dirty-bitmap: Change bdrv_[re]set_dirty_bitmap() to use bytes, Eric Blake, 2017/07/12
- [Qemu-devel] [PATCH v5 13/18] mirror: Switch mirror_dirty_init() to byte-based iteration, Eric Blake, 2017/07/12
- [Qemu-devel] [PATCH v5 14/18] qcow2: Switch qcow2_measure() to byte-based iteration, Eric Blake, 2017/07/12
- Re: [Qemu-devel] [PATCH v5 14/18] qcow2: Switch qcow2_measure() to byte-based iteration,
John Snow <=
- [Qemu-devel] [PATCH v5 15/18] qcow2: Switch load_bitmap_data() to byte-based iteration, Eric Blake, 2017/07/12
- [Qemu-devel] [PATCH v5 17/18] dirty-bitmap: Switch bdrv_set_dirty() to bytes, Eric Blake, 2017/07/12
- [Qemu-devel] [PATCH v5 16/18] qcow2: Switch store_bitmap_data() to byte-based iteration, Eric Blake, 2017/07/12
- [Qemu-devel] [PATCH v5 18/18] dirty-bitmap: Convert internal hbitmap size/granularity, Eric Blake, 2017/07/12