From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH 3/5] nvme/pci: End stopped queue requests directly
Date: Tue, 23 Jan 2018 15:14:52 +0200 [thread overview]
Message-ID: <dcdebb05-2e3d-2b47-a6db-ab298747cfeb@grimberg.me> (raw)
In-Reply-To: <20180122215630.13697-3-keith.busch@intel.com>
> +static void nvme_end_stopped_queue_request(struct request *req, void *data,
> + bool reserved)
nvme_pci_end_stopped_queue_request
> +{
> + struct nvme_iod *iod = blk_mq_rq_to_pdu(req);
> + struct nvme_queue *nvmeq = iod->nvmeq;
> +
> + if (nvmeq->cq_vector != -1)
> + return;
> + dev_dbg_ratelimited(((struct nvme_ctrl *) data)->device,
> + "Ending I/O %d QID:%d", req->tag, nvmeq->qid);
> + blk_mq_end_request(req, BLK_STS_IOERR);
> +}
> +
> static void nvme_reset_work(struct work_struct *work)
> {
> struct nvme_dev *dev =
> @@ -2344,6 +2357,8 @@ static void nvme_reset_work(struct work_struct *work)
> nvme_remove_namespaces(&dev->ctrl);
> new_state = NVME_CTRL_ADMIN_ONLY;
> } else {
> + nvme_set_iter(&dev->ctrl, dev->ctrl.tagset,
> + nvme_end_stopped_queue_request);
It would have been good if we could reuse that in other transports
where we maintain state flags (NVME_*_Q_LIVE).
next prev parent reply other threads:[~2018-01-23 13:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 21:56 [PATCH 1/5] nvme: Request cancelling helpers Keith Busch
2018-01-22 21:56 ` [PATCH 2/5] nvme: Ending failed unstarted requests Keith Busch
2018-01-23 2:15 ` jianchao.wang
2018-01-23 13:02 ` Sagi Grimberg
2018-01-23 13:09 ` jianchao.wang
2018-01-23 2:29 ` jianchao.wang
2018-01-23 13:07 ` Sagi Grimberg
2018-01-23 13:09 ` Sagi Grimberg
2018-01-22 21:56 ` [PATCH 3/5] nvme/pci: End stopped queue requests directly Keith Busch
2018-01-23 13:14 ` Sagi Grimberg [this message]
2018-01-22 21:56 ` [PATCH 4/5] nvme/pci: Remove cq_vector checks in io path Keith Busch
2018-01-22 21:56 ` [PATCH 5/5] nvme: Sync queues on controller resets Keith Busch
2018-01-23 12:45 ` [PATCH 1/5] nvme: Request cancelling helpers Sagi Grimberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dcdebb05-2e3d-2b47-a6db-ab298747cfeb@grimberg.me \
--to=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).