[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200814150433.GA3498391@dhcp-10-100-145-180.wdl.wdc.com>
Date: Fri, 14 Aug 2020 08:04:33 -0700
From: Keith Busch <kbusch@...nel.org>
To: Tong Zhang <ztong0001@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-nvme@...ts.infradead.org,
axboe@...com, hch@....de, sagi@...mberg.me
Subject: Re: [PATCH] nvme-pci: cancel nvme device request before disabling
On Fri, Aug 14, 2020 at 03:14:31AM -0400, Tong Zhang wrote:
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index ba725ae47305..c4f1ce0ee1e3 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -1249,8 +1249,8 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
> dev_warn_ratelimited(dev->ctrl.device,
> "I/O %d QID %d timeout, disable controller\n",
> req->tag, nvmeq->qid);
> - nvme_dev_disable(dev, true);
> nvme_req(req)->flags |= NVME_REQ_CANCELLED;
> + nvme_dev_disable(dev, true);
> return BLK_EH_DONE;
Shouldn't this flag have been set in nvme_cancel_request()? It's not
like the timeout out command is the only command to have been cancelled
by this action, nor is it guaranteed that getting here will mean the
request was in fact cancelled. The controller could still provide a real
completion.
Powered by blists - more mailing lists