diff options
| author | Gioh Kim <[email protected]> | 2021-04-06 14:36:38 +0200 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2021-04-13 19:51:34 -0300 |
| commit | 42cdc1909d701d5dcd24c2a797b6331b7f30b5c6 (patch) | |
| tree | 07e23ff0ede3b08a428f4cb4efbd7d1dbf29574c | |
| parent | 2f37b01725382cd1237d32363e844d4190268b33 (diff) | |
RDMA/rtrs-srv: More debugging info when fail to send reply
It does not help to debug if it only print error message
without any debugging information which session and connection
the error happened.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Gioh Kim <[email protected]>
Signed-off-by: Jack Wang <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
| -rw-r--r-- | drivers/infiniband/ulp/rtrs/rtrs-srv.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/infiniband/ulp/rtrs/rtrs-srv.c b/drivers/infiniband/ulp/rtrs/rtrs-srv.c index 5e9bb7bf5ef3..740cafffb7ef 100644 --- a/drivers/infiniband/ulp/rtrs/rtrs-srv.c +++ b/drivers/infiniband/ulp/rtrs/rtrs-srv.c @@ -518,8 +518,9 @@ bool rtrs_srv_resp_rdma(struct rtrs_srv_op *id, int status) if (unlikely(sess->state != RTRS_SRV_CONNECTED)) { rtrs_err_rl(s, - "Sending I/O response failed, session is disconnected, sess state %s\n", - rtrs_srv_state_str(sess->state)); + "Sending I/O response failed, session %s is disconnected, sess state %s\n", + kobject_name(&sess->kobj), + rtrs_srv_state_str(sess->state)); goto out; } if (always_invalidate) { @@ -529,7 +530,9 @@ bool rtrs_srv_resp_rdma(struct rtrs_srv_op *id, int status) } if (unlikely(atomic_sub_return(1, &con->sq_wr_avail) < 0)) { - pr_err("IB send queue full\n"); + rtrs_err(s, "IB send queue full: sess=%s cid=%d\n", + kobject_name(&sess->kobj), + con->c.cid); atomic_add(1, &con->sq_wr_avail); spin_lock(&con->rsp_wr_wait_lock); list_add_tail(&id->wait_list, &con->rsp_wr_wait_list); @@ -543,7 +546,8 @@ bool rtrs_srv_resp_rdma(struct rtrs_srv_op *id, int status) err = rdma_write_sg(id); if (unlikely(err)) { - rtrs_err_rl(s, "IO response failed: %d\n", err); + rtrs_err_rl(s, "IO response failed: %d: sess=%s\n", err, + kobject_name(&sess->kobj)); close_sess(sess); } out: |