]> git.proxmox.com Git - qemu.git/commitdiff
use int64_t for return values from rbd instead of int
authorStefan Priebe <s.priebe@profihost.ag>
Tue, 20 Nov 2012 12:44:55 +0000 (13:44 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 21 Nov 2012 08:43:23 +0000 (09:43 +0100)
rbd / rados tends to return pretty often length of writes
or discarded blocks. These values might be bigger than int.

The steps to reproduce are:

  mkfs.xfs -f a whole device bigger than int in bytes. mkfs.xfs sends
  a discard. Important is that you use scsi-hd and set
  discard_granularity=512. Otherwise rbd disabled discard support.

Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/rbd.c

index 0aaacaf8591aec8696f54651ed5b4c50f0b130a9..f3becc7a8ba351753a74d7a4945fa6c699eec3c6 100644 (file)
@@ -69,7 +69,7 @@ typedef enum {
 typedef struct RBDAIOCB {
     BlockDriverAIOCB common;
     QEMUBH *bh;
-    int ret;
+    int64_t ret;
     QEMUIOVector *qiov;
     char *bounce;
     RBDAIOCmd cmd;
@@ -86,7 +86,7 @@ typedef struct RADOSCB {
     int done;
     int64_t size;
     char *buf;
-    int ret;
+    int64_t ret;
 } RADOSCB;
 
 #define RBD_FD_READ 0