Skip to content

Commit a5c1a87

Browse files
mgurtovoykeithbusch
authored andcommitted
nvme-rdma: enhance timeout kernel log
Print the command_id along side blk-mq's tag to help match commands with protocol wire traces and logs. Signed-off-by: Max Gurtovoy <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent 172fb49 commit a5c1a87

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

drivers/nvme/host/rdma.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1941,9 +1941,14 @@ static enum blk_eh_timer_return nvme_rdma_timeout(struct request *rq)
19411941
struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq);
19421942
struct nvme_rdma_queue *queue = req->queue;
19431943
struct nvme_rdma_ctrl *ctrl = queue->ctrl;
1944-
1945-
dev_warn(ctrl->ctrl.device, "I/O %d QID %d timeout\n",
1946-
rq->tag, nvme_rdma_queue_idx(queue));
1944+
u8 opcode = req->req.cmd->common.opcode;
1945+
u8 fctype = req->req.cmd->fabrics.fctype;
1946+
int qid = nvme_rdma_queue_idx(queue);
1947+
1948+
dev_warn(ctrl->ctrl.device,
1949+
"I/O tag %d (%04x) opcode %#x (%s) QID %d timeout\n",
1950+
rq->tag, nvme_cid(rq), opcode,
1951+
nvme_opcode_str(qid, opcode, fctype), qid);
19471952

19481953
if (ctrl->ctrl.state != NVME_CTRL_LIVE) {
19491954
/*

0 commit comments

Comments
 (0)