]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: int -> int64_t on do_export
authorSage Weil <sage@newdream.net>
Tue, 15 Mar 2011 18:07:10 +0000 (11:07 -0700)
committerSage Weil <sage@newdream.net>
Tue, 15 Mar 2011 18:07:10 +0000 (11:07 -0700)
Prevent 32-bit overflow.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/rbd.cc

index a5eb473be4016cc7025808df43e4e67c8bfdd9dc..0580759a5bc9d00e1de1e5f8b65a6e7f1a2aecf3 100644 (file)
@@ -219,7 +219,7 @@ static int export_read_cb(uint64_t ofs, size_t len, const char *buf, void *arg)
 
 static int do_export(librbd::Image& image, const char *path)
 {
-  int r;
+  int64_t r;
   librbd::image_info_t info;
   bufferlist bl;
   int fd = open(path, O_WRONLY | O_CREAT | O_EXCL, 0644);