]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd: Fix the rbd export when image size more than 2G 2828/head
authorVicente Cheng <freeze.bilsted@gmail.com>
Wed, 29 Oct 2014 04:21:11 +0000 (12:21 +0800)
committerVicente Cheng <freeze.bilsted@gmail.com>
Wed, 29 Oct 2014 04:21:11 +0000 (12:21 +0800)
commit4b87a81c86db06f6fe2bee440c65fc05cd4c23ce
treef9a867aef7e269f3fb1aab7455a5e0901f073ed3
parent5c051f5c0c640ddc9b27b7cab3860a899dc185cb
rbd: Fix the rbd export when image size more than 2G

When using export <image-name> <path> and the size of image is more
than 2G, the previous version about finish() could not handle in
seeking the offset in image and return error.

This is caused by the incorrect variable type. Try to use the correct
variable type to fixed it.

I use another variable which type is uint64_t for confirming seeking
and still use the previous r for return error.

uint64_t is more better than type int for handle lseek64().

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
src/rbd.cc