OSDN Git Service

svcrdma: limit FRMR page list lengths to device max
authorSteve Wise <swise@opengridcomputing.com>
Fri, 7 Aug 2015 16:11:20 +0000 (11:11 -0500)
committerDoug Ledford <dledford@redhat.com>
Sun, 30 Aug 2015 22:08:46 +0000 (18:08 -0400)
commit9ac07501e1918b8d1140adcc360e8d8c7f5a2f7c
tree98de70b2b6d2a8325fa55cc46a69a1609ebad77f
parent0410e38eca85e042f5d5a281dbcc792db701ed44
svcrdma: limit FRMR page list lengths to device max

Svcrdma was incorrectly allocating fastreg MRs and page lists using
RPCSVC_MAXPAGES, which can exceed the device capabilities.  So limit
the depth to the minimum of RPCSVC_MAXPAGES and xprt->sc_frmr_pg_list_len.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
net/sunrpc/xprtrdma/svc_rdma_transport.c