Commit a5c1a87c authored by Max Gurtovoy's avatar Max Gurtovoy Committed by Keith Busch
Browse files

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: default avatarMax Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent 172fb496
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -1941,9 +1941,14 @@ static enum blk_eh_timer_return nvme_rdma_timeout(struct request *rq)
	struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq);
	struct nvme_rdma_queue *queue = req->queue;
	struct nvme_rdma_ctrl *ctrl = queue->ctrl;
	u8 opcode = req->req.cmd->common.opcode;
	u8 fctype = req->req.cmd->fabrics.fctype;
	int qid = nvme_rdma_queue_idx(queue);

	dev_warn(ctrl->ctrl.device, "I/O %d QID %d timeout\n",
		 rq->tag, nvme_rdma_queue_idx(queue));
	dev_warn(ctrl->ctrl.device,
		 "I/O tag %d (%04x) opcode %#x (%s) QID %d timeout\n",
		 rq->tag, nvme_cid(rq), opcode,
		 nvme_opcode_str(qid, opcode, fctype), qid);

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