diff options
| author | Amar Tumballi <amar@gluster.com> | 2011-10-10 15:03:56 +0530 | 
|---|---|---|
| committer | Vijay Bellur <vijay@gluster.com> | 2011-10-10 03:58:28 -0700 | 
| commit | bfd45840af03d07d11e467e497181dce3cec9df2 (patch) | |
| tree | 8ff9e893d545865e8608d4d8582f23a1d802cc00 /libglusterfs/src/iobuf.c | |
| parent | 2ca4dbc9ce8b00e81a05b66f0020403025548888 (diff) | |
libglusterfs/iobuf: increase the iobref's iobuf array size
earlier it was hardcoded to 8, now increased the size to 16.
also return the exact error code in client_submit_vec_request(),
so there will be no missing frames in case of errors.
Change-Id: I82a6ee681a543b673a7cf1a0b9c5ade2a7175ebe
BUG: 3679
Reviewed-on: http://review.gluster.com/570
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'libglusterfs/src/iobuf.c')
| -rw-r--r-- | libglusterfs/src/iobuf.c | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c index 777185f6613..734f5960624 100644 --- a/libglusterfs/src/iobuf.c +++ b/libglusterfs/src/iobuf.c @@ -578,7 +578,7 @@ iobref_destroy (struct iobref *iobref)          GF_VALIDATE_OR_GOTO ("iobuf", iobref, out); -        for (i = 0; i < 8; i++) { +        for (i = 0; i < GF_IOBREF_IOBUF_COUNT; i++) {                  iobuf = iobref->iobrefs[i];                  iobref->iobrefs[i] = NULL; @@ -623,7 +623,7 @@ __iobref_add (struct iobref *iobref, struct iobuf *iobuf)          GF_VALIDATE_OR_GOTO ("iobuf", iobref, out);          GF_VALIDATE_OR_GOTO ("iobuf", iobuf, out); -        for (i = 0; i < 8; i++) { +        for (i = 0; i < GF_IOBREF_IOBUF_COUNT; i++) {                  if (iobref->iobrefs[i] == NULL) {                          iobref->iobrefs[i] = iobuf_ref (iobuf);                          ret = 0; @@ -667,7 +667,7 @@ iobref_merge (struct iobref *to, struct iobref *from)          LOCK (&from->lock);          { -                for (i = 0; i < 8; i++) { +                for (i = 0; i < GF_IOBREF_IOBUF_COUNT; i++) {                          iobuf = from->iobrefs[i];                          if (!iobuf) @@ -719,7 +719,7 @@ iobref_size (struct iobref *iobref)          LOCK (&iobref->lock);          { -                for (i = 0; i < 8; i++) { +                for (i = 0; i < GF_IOBREF_IOBUF_COUNT; i++) {                          if (iobref->iobrefs[i])                                  size += iobuf_size (iobref->iobrefs[i]);                  }  | 
