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 <ebl...@redhat.com> > Reviewed-by: John Snow <js...@redhat.com>