Re: [Qemu-devel] [PATCH] overflow of int ret: use ssize_t for ret

2012-11-22 Thread Stefan Weil

Am 22.11.2012 20:09, schrieb Stefan Priebe - Profihost AG:

Hi Andreas,

thanks for your comment. Do i have to resend this patch?

--
Greets,
Stefan




Hi Stefan,

I'm afraid yes, you'll have to resend the patch.

Signed-off-by is a must, see http://wiki.qemu.org/Contribute/SubmitAPatch

When you resend the patch, you can fix the minor issues (subject)as well.

Regards

StefanW.


--
To unsubscribe from this list: send the line unsubscribe ceph-devel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] [PATCH] use int64_t for return values from rbd instead of int

2012-11-22 Thread Stefan Weil
   Am 21.11.2012 21:53, schrieb Stefan   Priebe -
Profihost AG:
 Not sure about off_t. What is min and max size?  Stefan

 off_t is a signed value which is used in function lseek to
 address any byte of a seekable file.
 The range is typically 64 bit (like int64_t), but may be smaller if
the host only supports 2 GB files.
 Stefan


--
To unsubscribe from this list: send the line unsubscribe ceph-devel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] [PATCH] use int64_t for return values from rbd instead of int

2012-11-21 Thread Stefan Weil

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.pri...@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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html