From: wenxiong@linux.vnet.ibm.com (wenxiong)
Subject: [PATCH]nvme-pci: Fixes EEH failure on ppc
Date: Tue, 06 Feb 2018 10:55:41 -0600 [thread overview]
Message-ID: <d2ea54c017d9954e4f3d4cf80040867d@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180206163347.GG31110@localhost.localdomain>
On 2018-02-06 10:33, Keith Busch wrote:
> On Mon, Feb 05, 2018 at 03:49:40PM -0600, wenxiong at vmlinux.vnet.ibm.com
> wrote:
>> @@ -1189,6 +1183,12 @@ static enum blk_eh_timer_return
>> nvme_timeout(struct request *req, bool reserved)
>> struct nvme_command cmd;
>> u32 csts = readl(dev->bar + NVME_REG_CSTS);
>>
>> + /* If PCI error recovery process is happening, we cannot reset or
>> + * the recovery mechanism will surely fail.
>> + */
>> + if (pci_channel_offline(to_pci_dev(dev->dev)))
>> + return BLK_EH_HANDLED;
>> +
>
> This patch will tell the block layer to complete the request and
> consider
> it a success, but it doesn't look like the command actually completed
> at
> all. You're going to get data corruption this way, right? Is returning
> BLK_EH_HANDLED immediately really the right thing to do here?
>
Hi Keith,
Do you think we can return with BLK_EH_NOT_HANDLED?
enum blk_eh_timer_return {
BLK_EH_NOT_HANDLED,
BLK_EH_HANDLED,
BLK_EH_RESET_TIMER,
};
Probably need to change the following return value as well.
/*
* Reset immediately if the controller is failed
*/
if (nvme_should_reset(dev, csts)) {
nvme_warn_reset(dev, csts);
nvme_dev_disable(dev, false);
nvme_reset_ctrl(&dev->ctrl);
return BLK_EH_HANDLED;
}
Let me know. I can re-build the kernel and try it.
Thanks,
Wendy
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2018-02-06 16:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-05 21:49 [PATCH]nvme-pci: Fixes EEH failure on ppc wenxiong
2018-02-06 9:54 ` Sagi Grimberg
2018-02-06 16:33 ` Keith Busch
2018-02-06 16:55 ` wenxiong [this message]
2018-02-06 17:02 ` Keith Busch
2018-02-06 17:08 ` wenxiong
2018-02-06 17:15 ` Keith Busch
2018-02-06 18:00 ` wenxiong
2018-02-06 20:01 ` wenxiong
2018-02-07 1:24 ` Ming Lei
2018-02-07 20:19 ` wenxiong
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=d2ea54c017d9954e4f3d4cf80040867d@linux.vnet.ibm.com \
--to=wenxiong@linux.vnet.ibm.com \
/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