summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libglusterfs/src/iobuf.c8
-rw-r--r--libglusterfs/src/iobuf.h3
-rw-r--r--xlators/protocol/client/src/client3_1-fops.c3
3 files changed, 7 insertions, 7 deletions
diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c
index a1968a99a8d..f29ce93c31e 100644
--- a/libglusterfs/src/iobuf.c
+++ b/libglusterfs/src/iobuf.c
@@ -678,7 +678,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;
@@ -723,7 +723,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;
@@ -767,7 +767,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)
@@ -819,7 +819,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]);
}
diff --git a/libglusterfs/src/iobuf.h b/libglusterfs/src/iobuf.h
index 992ded8f499..efceb2d05b9 100644
--- a/libglusterfs/src/iobuf.h
+++ b/libglusterfs/src/iobuf.h
@@ -27,6 +27,7 @@
#include <sys/uio.h>
#define GF_VARIABLE_IOBUF_COUNT 32
+#define GF_IOBREF_IOBUF_COUNT 16
/* Lets try to define the new anonymous mapping
* flag, in case the system is still using the
@@ -141,7 +142,7 @@ void iobuf_to_iovec(struct iobuf *iob, struct iovec *iov);
struct iobref {
gf_lock_t lock;
int ref;
- struct iobuf *iobrefs[8];
+ struct iobuf *iobrefs[GF_IOBREF_IOBUF_COUNT];
};
struct iobref *iobref_new ();
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c
index e9c5d626bb4..6f93eccc0d0 100644
--- a/xlators/protocol/client/src/client3_1-fops.c
+++ b/xlators/protocol/client/src/client3_1-fops.c
@@ -121,7 +121,7 @@ out:
iobuf_unref (iobuf);
- return 0;
+ return ret;
}
/* CBK */
@@ -3578,7 +3578,6 @@ client3_1_writev (call_frame_t *frame, xlator_t *this, void *data)
ret = client_submit_vec_request (this, &req, frame, conf->fops, GFS3_OP_WRITE,
client3_1_writev_cbk, args->vector,
args->count, args->iobref,
-
(xdrproc_t)xdr_gfs3_write_req);
if (ret)
goto unwind;