rbd: shift byte count as a 64-bit value
commite948f663e9334249c394b88926addcdd3f9e35cd
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 10 Oct 2016 19:58:58 +0000 (10 21:58 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 23 Oct 2016 14:10:59 +0000 (23 16:10 +0200)
treed187b8b01f4bea45a752862ef1301d920b6bf963
parent3c0ed2a342e5acb97bdd2c7b64d33a904ad75940
rbd: shift byte count as a 64-bit value

Otherwise, reads of more than 2GB fail.  Until commit
7bbca9e290a9c7c217b5a24fc6094e91e54bd05d, reads of 2^41
bytes succeeded at least theoretically.

In fact, pdiscard ought to receive a 64-bit integer as the
count for the same reason.

Reported by Coverity.

Fixes: 7bbca9e290a9c7c217b5a24fc6094e91e54bd05d
Cc: qemu-stable@nongnu.org
Cc: kwolf@redhat.com
Cc: eblake@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
block/rbd.c