On 10/10/2016 03:00 PM, Paolo Bonzini wrote: > Otherwise, reads of more than 2GB fail. Until commit > 7bbca9e290a9c7c217b5a24fc6094e91e54bd05d, reads of 2^41 > bytes succeeded at least theoretically.
I don't think the block layer ever passes a read request down to drivers that large in the first place; we have a lot of code in io.c that clamps/asserts things to be smaller than 2^31 (ie. BDRV_REQUEST_MAX_SECTORS). So this may just be cleaning up something that would become latent with a future block change to support larger sizes, rather than an actual bug fix today. But it is worth making. > In fact, pdiscard ought to receive a 64-bit integer as the > count for the same reason. Yes, auditing ALL of the block code for eliminating arbitrary 32-bit limits would be a big project. > > Reported by Coverity. > > Fixes: 7bbca9e290a9c7c217b5a24fc6094e91e54bd05d > Cc: qemu-sta...@nongnu.org > Cc: kw...@redhat.com > Cc: ebl...@redhat.com > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > block/rbd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature