Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nvme-pci: print the command name of aborted commands

To allow for slightly better debugging, print the command name when
aborting an command.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
86141440 33b6debd

+5 -2
+1
drivers/nvme/host/constants.c
··· 177 177 return nvme_ops[opcode]; 178 178 return "Unknown"; 179 179 } 180 + EXPORT_SYMBOL_GPL(nvme_get_opcode_str); 180 181 181 182 const unsigned char *nvme_get_admin_opcode_str(u8 opcode) 182 183 {
+4 -2
drivers/nvme/host/pci.c
··· 1434 1434 cmd.abort.sqid = cpu_to_le16(nvmeq->qid); 1435 1435 1436 1436 dev_warn(nvmeq->dev->ctrl.device, 1437 - "I/O %d QID %d timeout, aborting\n", 1438 - req->tag, nvmeq->qid); 1437 + "I/O %d (%s) QID %d timeout, aborting\n", 1438 + req->tag, 1439 + nvme_get_opcode_str(nvme_req(req)->cmd->common.opcode), 1440 + nvmeq->qid); 1439 1441 1440 1442 abort_req = blk_mq_alloc_request(dev->ctrl.admin_q, nvme_req_op(&cmd), 1441 1443 BLK_MQ_REQ_NOWAIT);