Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
qemu.8403
0102-rbd-shift-byte-count-as-a-64-bit-va.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0102-rbd-shift-byte-count-as-a-64-bit-va.patch of Package qemu.8403
From 24851874c17117238069f3bfd4cdadd728261fa6 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini <pbonzini@redhat.com> Date: Mon, 10 Oct 2016 21:58:58 +0200 Subject: [PATCH] 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> (cherry picked from commit e948f663e9334249c394b88926addcdd3f9e35cd) [BR: BSC#1013341] Signed-off-by: Bruce Rogers <brogers@suse.com> --- block/rbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index ee2f416848..70e76ce4a4 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -729,7 +729,7 @@ static BlockAIOCB *qemu_rbd_aio_readv(BlockDriverState *bs, void *opaque) { return rbd_start_aio(bs, sector_num << BDRV_SECTOR_BITS, qiov, - nb_sectors << BDRV_SECTOR_BITS, cb, opaque, + (int64_t) nb_sectors << BDRV_SECTOR_BITS, cb, opaque, RBD_AIO_READ); } @@ -741,7 +741,7 @@ static BlockAIOCB *qemu_rbd_aio_writev(BlockDriverState *bs, void *opaque) { return rbd_start_aio(bs, sector_num << BDRV_SECTOR_BITS, qiov, - nb_sectors << BDRV_SECTOR_BITS, cb, opaque, + (int64_t) nb_sectors << BDRV_SECTOR_BITS, cb, opaque, RBD_AIO_WRITE); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor