From: Sagi Grimberg <sagi@grimberg.me>
To: Chao Leng <lengchao@huawei.com>, linux-nvme@lists.infradead.org
Cc: kbusch@kernel.org, axboe@fb.com, hch@lst.de
Subject: Re: [PATCH] nvme-core: optimize process for error status NVME_SC_CMD_INTERRUPTED
Date: Fri, 24 Jul 2020 15:01:44 -0700 [thread overview]
Message-ID: <29618961-2596-7d75-40de-13af435d2d83@grimberg.me> (raw)
In-Reply-To: <20200724081407.19346-1-lengchao@huawei.com>
> @@ -243,7 +242,7 @@ static blk_status_t nvme_error_status(u16 status)
>
> static inline bool nvme_req_needs_retry(struct request *req)
> {
> - if (blk_noretry_request(req))
> + if (!nvme_req_local_retry(req) && blk_noretry_request(req))
Why is this needed?
> return false;
> if (nvme_req(req)->status & NVME_SC_DNR)
> return false;
> diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
> index 1de3f9b827aa..3213aae8985c 100644
> --- a/drivers/nvme/host/nvme.h
> +++ b/drivers/nvme/host/nvme.h
> @@ -725,4 +725,10 @@ void nvme_hwmon_init(struct nvme_ctrl *ctrl);
> static inline void nvme_hwmon_init(struct nvme_ctrl *ctrl) { }
> #endif
>
> +static inline bool nvme_req_local_retry(struct request *req)
> +{
> + if (nvme_req(req)->status == NVME_SC_CMD_INTERRUPTED)
> + return true;
> + return false;
> +}
> #endif /* _NVME_H */
>
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-07-24 22:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-24 8:14 [PATCH] nvme-core: optimize process for error status NVME_SC_CMD_INTERRUPTED Chao Leng
2020-07-24 22:01 ` Sagi Grimberg [this message]
2020-07-25 9:00 ` Chao Leng
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=29618961-2596-7d75-40de-13af435d2d83@grimberg.me \
--to=sagi@grimberg.me \
--cc=axboe@fb.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=lengchao@huawei.com \
--cc=linux-nvme@lists.infradead.org \
/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).