aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTom Tucker <tom@opengridcomputing.com>2008-04-30 21:44:39 -0400
committerTom Tucker <tom@opengridcomputing.com>2008-05-19 08:33:52 -0400
commit8740767376b32a7772607e1b2b07cde0c24120cc (patch)
tree62e9831548e0cdd2e70951a9ab9df4b93ca440aa /include
parent02e7452de74d308ca642f54f7e5ef801ced60a92 (diff)
svcrdma: Use standard Linux lists for context cache
Replace the one-off linked list implementation used to implement the context cache with the standard Linux list_head lists. Add a context counter to catch resource leaks. A WARN_ON will be added later to ensure that we've freed all contexts. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/sunrpc/svc_rdma.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
index c447c417b37b..701439064d21 100644
--- a/include/linux/sunrpc/svc_rdma.h
+++ b/include/linux/sunrpc/svc_rdma.h
@@ -72,7 +72,7 @@ extern atomic_t rdma_stat_sq_prod;
72 */ 72 */
73struct svc_rdma_op_ctxt { 73struct svc_rdma_op_ctxt {
74 struct svc_rdma_op_ctxt *read_hdr; 74 struct svc_rdma_op_ctxt *read_hdr;
75 struct svc_rdma_op_ctxt *next; 75 struct list_head free_list;
76 struct xdr_buf arg; 76 struct xdr_buf arg;
77 struct list_head dto_q; 77 struct list_head dto_q;
78 enum ib_wr_opcode wr_op; 78 enum ib_wr_opcode wr_op;
@@ -104,7 +104,8 @@ struct svcxprt_rdma {
104 104
105 struct ib_pd *sc_pd; 105 struct ib_pd *sc_pd;
106 106
107 struct svc_rdma_op_ctxt *sc_ctxt_head; 107 atomic_t sc_ctxt_used;
108 struct list_head sc_ctxt_free;
108 int sc_ctxt_cnt; 109 int sc_ctxt_cnt;
109 int sc_ctxt_bump; 110 int sc_ctxt_bump;
110 int sc_ctxt_max; 111 int sc_ctxt_max;