Commit 39579056 authored by Chuck Lever's avatar Chuck Lever Committed by Anna Schumaker
Browse files

xprtrdma: Toggle XPRT_CONGESTED in xprtrdma's slot methods



Commit 48be539d ("xprtrdma: Introduce ->alloc_slot call-out for
xprtrdma") added a separate alloc_slot and free_slot to the RPC/RDMA
transport. Later, commit 75891f50 ("SUNRPC: Support for
congestion control when queuing is enabled") modified the generic
alloc/free_slot methods, but neglected the methods in xprtrdma.

Found via code review.

Fixes: 75891f50 ("SUNRPC: Support for congestion control ... ")
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent eed48a9c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -571,6 +571,7 @@ xprt_rdma_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task)
	return;

out_sleep:
	set_bit(XPRT_CONGESTED, &xprt->state);
	rpc_sleep_on(&xprt->backlog, task, NULL);
	task->tk_status = -EAGAIN;
}
@@ -589,7 +590,8 @@ xprt_rdma_free_slot(struct rpc_xprt *xprt, struct rpc_rqst *rqst)

	memset(rqst, 0, sizeof(*rqst));
	rpcrdma_buffer_put(&r_xprt->rx_buf, rpcr_to_rdmar(rqst));
	rpc_wake_up_next(&xprt->backlog);
	if (unlikely(!rpc_wake_up_next(&xprt->backlog)))
		clear_bit(XPRT_CONGESTED, &xprt->state);
}

static bool rpcrdma_check_regbuf(struct rpcrdma_xprt *r_xprt,