summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src/rpcsvc.c
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2014-12-05 19:46:53 +0530
committerRaghavendra G <rgowdapp@redhat.com>2014-12-07 20:37:43 -0800
commit92a293220117f896bfcc1950dabd5bb1bfae9965 (patch)
tree4e2eb055dd05ddcff33d3209a3b42fdef220829e /rpc/rpc-lib/src/rpcsvc.c
parentfcdac758ad7b3dda9843f92597a15e4a30a3b746 (diff)
rdma:vectored write fails for rdma.
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. Change-Id: I82a649a34abe6320d6216c8ce73e69d9b5e99326 BUG: 1171142 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>
Diffstat (limited to 'rpc/rpc-lib/src/rpcsvc.c')
-rw-r--r--rpc/rpc-lib/src/rpcsvc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c
index b19a905692d..a8a09048a44 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];
}
}