[pve-devel] [Qemu-devel] [PATCH] use int64_t for return values from rbd instead of int
Stefan Priebe - Profihost AG
s.priebe at profihost.ag
Wed Nov 21 21:53:32 CET 2012
Not sure about off_t. What is min and max size?
Stefan
Am 21.11.2012 um 18:03 schrieb Stefan Weil <sw at weilnetz.de>:
> Am 20.11.2012 13:44, schrieb Stefan Priebe:
>> rbd / rados tends to return pretty often length of writes
>> or discarded blocks. These values might be bigger than int.
>>
>> Signed-off-by: Stefan Priebe <s.priebe at profihost.ag>
>> ---
>> block/rbd.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/block/rbd.c b/block/rbd.c
>> index f57d0c6..6bf9c2e 100644
>> --- a/block/rbd.c
>> +++ b/block/rbd.c
>> @@ -69,7 +69,7 @@ typedef enum {
>> typedef struct RBDAIOCB {
>> BlockDriverAIOCB common;
>> QEMUBH *bh;
>> - int ret;
>> + int64_t ret;
>> QEMUIOVector *qiov;
>> char *bounce;
>> RBDAIOCmd cmd;
>> @@ -87,7 +87,7 @@ typedef struct RADOSCB {
>> int done;
>> int64_t size;
>> char *buf;
>> - int ret;
>> + int64_t ret;
>> } RADOSCB;
>> #define RBD_FD_READ 0
>
>
> Why do you use int64_t instead of off_t?
> If the value is related to file sizes, off_t would be a good choice.
>
> Stefan W.
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the pve-devel
mailing list