[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [RFC PATCH 27/56] block/dirty-bitmap: Clea
From: |
John Snow |
Subject: |
Re: [Qemu-block] [Qemu-devel] [RFC PATCH 27/56] block/dirty-bitmap: Clean up signed vs. unsigned dirty counts |
Date: |
Mon, 7 Aug 2017 21:50:50 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 08/07/2017 10:45 AM, Markus Armbruster wrote:
> hbitmap_count() returns uint64_t.
>
> Clean up test-hbitmap.c to check its value with g_assert_cmpuint()
> instead of g_assert_cmpint().
>
> bdrv_get_dirty_count() and bdrv_get_meta_dirty_count() return its
> value converted to int64_t. Clean them up to return it unadulterated.
>
> This moves the implicit conversion to some callers, so clean them up,
> too.
>
> mirror_run() assigns the value of bdrv_get_meta_dirty_count() to a
> local int64_t variable. Change it to uint64_t. Signedness still gets
> mixed up in the computation of s->common.len, but messing with that is
> more than I can handle right now.
>
> get_remaining_dirty() tallies bdrv_get_dirty_count() values in
> int64_t. Its caller block_save_pending() converts it back to
> uint64_t. Change get_remaining_dirty() to uint64_t.
>
> Signed-off-by: Markus Armbruster <address@hidden>
So these functions can't fail, so there's no reason to keep the int64_t
type around, OK.
Reviewed-by: John Snow <address@hidden>
- Re: [Qemu-block] [Qemu-devel] [RFC PATCH 29/56] block: Make BlockDirtyInfo byte count unsigned in QAPI/QMP, (continued)
- [Qemu-block] [RFC PATCH 35/56] blockjob: Lift speed sign conversion into block_job_set_speed(), Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 37/56] blockjob: Make BlockJobInfo and event speed unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 33/56] block: Make block_resize size unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 26/56] block: Make BlockMeasureInfo sizes unsigned in QAPI, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 32/56] hmp: Make block_set_io_throttle's arguments unsigned, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 27/56] block/dirty-bitmap: Clean up signed vs. unsigned dirty counts, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 31/56] block: Make throttle byte rates and sizes unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 39/56] blockjob: Lift speed sign conversion out of block_job_create(), Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 45/56] blockjob: Lift speed sign conversion out of commit_start() etc., Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 36/56] blockjob: Drop unused parameter @errp of method set_speed(), Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 43/56] blockjob: Lift speed sign conversion out of mirror_start(), Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 44/56] blockjob: Lift speed sign conversion out of blockdev_mirror_common(), Markus Armbruster, 2017/08/07