From: Victor Gladkov <Victor.Gladkov@kioxia.com>
To: Hannes Reinecke <hare@suse.de>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Cc: Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
Sagi Grimberg <sagi@grimberg.me>,
"Ewan D. Milne" <emilne@redhat.com>,
James Smart <james.smart@broadcom.com>
Subject: RE: [PATCH v9] nvme-fabrics: reject I/O to offline device
Date: Sun, 15 Nov 2020 15:45:14 +0000 [thread overview]
Message-ID: <a3245f7368364c5b83cdd3ed3a61d718@kioxia.com> (raw)
In-Reply-To: <b6f09a8e-e633-e303-1f39-cd380fd92f2c@suse.de>
> -----Original Message-----
> From: Hannes Reinecke [mailto:hare@suse.de]
> Sent: Thursday, 01 October, 2020 11:55
> > ---
> > drivers/nvme/host/core.c | 49
> > ++++++++++++++++++++++++++++++++++++++++++-
> > drivers/nvme/host/fabrics.c | 25 +++++++++++++++++++---
> > drivers/nvme/host/fabrics.h | 5 +++++
> > drivers/nvme/host/multipath.c | 5 ++++-
> > drivers/nvme/host/nvme.h | 3 +++
> > 5 files changed, 82 insertions(+), 5 deletions(-)
> >
> I did some more experiments with this, and found that there are some issues
> with ANA handling.
> If reconnect works, but the ANA state indicates that we still can't sent I/O (eg
> by still being in transitioning), we hit the 'requeueing I/O'
> state despite fast_io_fail_tmo being set. Not sure if that's the expected
> outcome.
> For that it might be better to move the FAILFAST_EXPIRED bit into the
> namespace, as then we could selectively clear the bit in
> nvme_failfast_work():
>
> @@ -151,12 +151,16 @@ EXPORT_SYMBOL_GPL(nvme_try_sched_reset);
> static void nvme_failfast_work(struct work_struct *work) {
> struct nvme_ctrl *ctrl = container_of(to_delayed_work(work),
> struct nvme_ctrl, failfast_work);
> + struct nvme_ns *ns;
>
> - if (ctrl->state != NVME_CTRL_CONNECTING)
> - return;
> -
> -
> - set_bit(NVME_CTRL_FAILFAST_EXPIRED, &ctrl->flags);
> + down_read(&ctrl->namespaces_rwsem);
> + list_for_each_entry(ns, &ctrl->namespaces, list) {
> + if (ctrl->state != NVME_CTRL_LIVE ||
> + (ns->ana_state != NVME_ANA_OPTIMIZED &&
> + ns->ana_state != NVME_ANA_NONOPTIMIZED))
> + set_bit(NVME_NS_FAILFAST_EXPIRED, &ns->flags);
> + }
> + up_read(&ctrl->namespaces_rwsem);
> dev_info(ctrl->device, "failfast expired\n");
>
> ...and we could leave the failfast worker running even after the controller
> transitioned to LIVE.
> Cf the attached patch for details.
>
> Cheers,
>
> Hannes
> --
I'm not sure what makes sense to move the FAILFAST_EXPIRED bit into the namespace,
Because the failfast mechanism characterizes the controller as a whole.
Any comments on this?
Regards,
Victor
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-11-15 15:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 15:27 [PATCH v9] nvme-fabrics: reject I/O to offline device Victor Gladkov
2020-09-29 18:19 ` Sagi Grimberg
2020-09-30 5:46 ` Hannes Reinecke
2020-09-30 6:39 ` Christoph Hellwig
2020-10-01 8:55 ` Hannes Reinecke
2020-11-15 15:45 ` Victor Gladkov [this message]
2020-11-16 9:54 ` Hannes Reinecke
2020-11-17 8:39 ` Sagi Grimberg
2020-11-20 13:09 ` Hannes Reinecke
[not found] <3e9337bfbd7f410eb632e96a44b43924@kioxia.com>
2020-09-30 13:14 ` Hannes Reinecke
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=a3245f7368364c5b83cdd3ed3a61d718@kioxia.com \
--to=victor.gladkov@kioxia.com \
--cc=emilne@redhat.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=james.smart@broadcom.com \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=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