Re: [Qemu-block] [Qemu-devel] [RFC PATCH 28/56] block: Widen dirty bitmap granularity to uint64_t for safety

2017-08-08 Thread Markus Armbruster
John Snow writes: > On 08/07/2017 10:45 AM, Markus Armbruster wrote: >> Block dirty bitmaps represent granularity in bytes as uint32_t. It >> must be a power of two and a multiple of BDRV_SECTOR_SIZE. >> >> The trouble with uint32_t is computations like this one in >> mirror_do_read(): >> >>

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 28/56] block: Widen dirty bitmap granularity to uint64_t for safety

2017-08-08 Thread Eric Blake
On 08/07/2017 08:55 PM, John Snow wrote: > > > On 08/07/2017 10:45 AM, Markus Armbruster wrote: >> Block dirty bitmaps represent granularity in bytes as uint32_t. It >> must be a power of two and a multiple of BDRV_SECTOR_SIZE. >> >> The trouble with uint32_t is computations like this one in >>

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 28/56] block: Widen dirty bitmap granularity to uint64_t for safety

2017-08-07 Thread John Snow
On 08/07/2017 10:45 AM, Markus Armbruster wrote: > Block dirty bitmaps represent granularity in bytes as uint32_t. It > must be a power of two and a multiple of BDRV_SECTOR_SIZE. > > The trouble with uint32_t is computations like this one in > mirror_do_read(): > > uint64_t max_bytes; > >