[PATCH] nvme-pci: print the command name of aborted commands
Sagi Grimberg
sagi at grimberg.me
Thu Jul 21 15:20:48 PDT 2022
> To allow for slightly better debugging, print the command name when
> aborting an command.
>
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> ---
> drivers/nvme/host/pci.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index e465902e0b752..1f229dabbe7aa 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -1434,8 +1434,10 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
> cmd.abort.sqid = cpu_to_le16(nvmeq->qid);
>
> dev_warn(nvmeq->dev->ctrl.device,
> - "I/O %d QID %d timeout, aborting\n",
> - req->tag, nvmeq->qid);
> + "I/O %d (%s) QID %d timeout, aborting\n",
> + req->tag,
> + nvme_get_opcode_str(nvme_req(req)->cmd->common.opcode),
> + nvmeq->qid);
I want that for rdma/tcp/loop as well.
Reviewed-by: Sagi Grimberg <sagi at grimberg.me>
More information about the Linux-nvme
mailing list