mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 13:44:15 +08:00
xprtrdma: Trace marshaling failures
Record an event when rpcrdma_marshal_req returns a non-zero return value to help track down why an xprt close might have occurred. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
4ba02e8d0e
commit
17e4c443c0
@ -511,6 +511,33 @@ TRACE_EVENT(xprtrdma_marshal,
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
TRACE_EVENT(xprtrdma_marshal_failed,
|
||||||
|
TP_PROTO(const struct rpc_rqst *rqst,
|
||||||
|
int ret
|
||||||
|
),
|
||||||
|
|
||||||
|
TP_ARGS(rqst, ret),
|
||||||
|
|
||||||
|
TP_STRUCT__entry(
|
||||||
|
__field(unsigned int, task_id)
|
||||||
|
__field(unsigned int, client_id)
|
||||||
|
__field(u32, xid)
|
||||||
|
__field(int, ret)
|
||||||
|
),
|
||||||
|
|
||||||
|
TP_fast_assign(
|
||||||
|
__entry->task_id = rqst->rq_task->tk_pid;
|
||||||
|
__entry->client_id = rqst->rq_task->tk_client->cl_clid;
|
||||||
|
__entry->xid = be32_to_cpu(rqst->rq_xid);
|
||||||
|
__entry->ret = ret;
|
||||||
|
),
|
||||||
|
|
||||||
|
TP_printk("task:%u@%u xid=0x%08x: ret=%d",
|
||||||
|
__entry->task_id, __entry->client_id, __entry->xid,
|
||||||
|
__entry->ret
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
TRACE_EVENT(xprtrdma_post_send,
|
TRACE_EVENT(xprtrdma_post_send,
|
||||||
TP_PROTO(
|
TP_PROTO(
|
||||||
const struct rpcrdma_req *req,
|
const struct rpcrdma_req *req,
|
||||||
|
@ -875,6 +875,7 @@ rpcrdma_marshal_req(struct rpcrdma_xprt *r_xprt, struct rpc_rqst *rqst)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_err:
|
out_err:
|
||||||
|
trace_xprtrdma_marshal_failed(rqst, ret);
|
||||||
switch (ret) {
|
switch (ret) {
|
||||||
case -EAGAIN:
|
case -EAGAIN:
|
||||||
xprt_wait_for_buffer_space(rqst->rq_xprt);
|
xprt_wait_for_buffer_space(rqst->rq_xprt);
|
||||||
|
Loading…
Reference in New Issue
Block a user