diff options
author | Mohammed Rafi KC <rkavunga@redhat.com> | 2014-12-05 19:46:53 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2014-12-07 20:37:43 -0800 |
commit | 92a293220117f896bfcc1950dabd5bb1bfae9965 (patch) | |
tree | 4e2eb055dd05ddcff33d3209a3b42fdef220829e /rpc | |
parent | fcdac758ad7b3dda9843f92597a15e4a30a3b746 (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')
-rw-r--r-- | rpc/rpc-lib/src/rpc-transport.h | 2 | ||||
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.c | 4 |
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 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]; } } |