summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2014-12-05 19:46:53 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2015-01-06 21:41:17 -0800
commite281c3dfac7a4178447436356c7e72e4e12bd09a (patch)
tree0b462895f4d5adcedff290fff685a743c4aa828a /rpc
parent59ba78ae1461651e290ce72013786d828545d4c1 (diff)
rdma:vectored write fails for rdma.
Backport of http://review.gluster.org/9247 For rdma write with payload count greater than one will fail due to insuffient memory to hold the buffers in rpc transport layer. It was expecting only one vector in payload, So it can only able to decode the first iovec from payload, and the rest will be discarded. Thnaks to Raghavendra Gowdappa for fixing the same. BUG: 1166515 Change-Id: I5e44d240366af78df35df326fe0660ef8497147b Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/9247 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/9392 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/rpc-transport.h2
-rw-r--r--rpc/rpc-lib/src/rpcsvc.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.h b/rpc/rpc-lib/src/rpc-transport.h
index 117d5e1e8ce..2beff0822a2 100644
--- a/rpc/rpc-lib/src/rpc-transport.h
+++ b/rpc/rpc-lib/src/rpc-transport.h
@@ -163,7 +163,7 @@ typedef struct rpc_request_info rpc_request_info_t;
struct rpc_transport_pollin {
- struct iovec vector[2];
+ struct iovec vector[MAX_IOVEC];
int count;
char vectored;
void *private;
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c
index 0d3cb8f8ef6..ca54e995afc 100644
--- a/rpc/rpc-lib/src/rpcsvc.c
+++ b/rpc/rpc-lib/src/rpcsvc.c
@@ -401,9 +401,9 @@ rpcsvc_request_init (rpcsvc_t *svc, rpc_transport_t *trans,
req->msg[0] = progmsg;
req->iobref = iobref_ref (msg->iobref);
if (msg->vectored) {
- /* msg->vector[2] is defined in structure. prevent a
+ /* msg->vector[MAX_IOVEC] is defined in structure. prevent a
out of bound access */
- for (i = 1; i < min (msg->count, 2); i++) {
+ for (i = 1; i < min (msg->count, MAX_IOVEC); i++) {
req->msg[i] = msg->vector[i];
}
}