Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-nvme@lists.infradead.org,
	Daniel Wagner <daniel.wagner@suse.com>,
	Sagi Grimberg <sagi@grimberg.me>,
	Keith Busch <keith.busch@wdc.com>, Hannes Reinecke <hare@suse.de>
Subject: [PATCH 0/2] nvme: fix reconnection stalls
Date: Thu,  4 Jun 2020 13:56:00 +0200	[thread overview]
Message-ID: <20200604115602.78446-1-hare@suse.de> (raw)

Hi all,

during testing we have come across namespaces not being available
after reconnection. This is caused by (yet another) deadlock between
reconnect and scanning; reconnection will wait for the scan workqueue
to be flushed, but scanning cannot make progress if I/O is
outstanding, as the I/O will only be completed _after_ reconnection
completed.
The particular issue here is that nvme_revalidate_disk() might be
several I/O to be sent; the first one (IDENTIFY NAMESPACE) will be
terminated, but the subsequent ones are not.
These two patches fix this deadlock by checking the controller state
before sending the I/O.

As usual, comments and reviews are welcome.

Hannes Reinecke (2):
  nvme: check for NVME_CTRL_LIVE in nvme_report_ns_ids()
  nvme: do not update multipath disk information if the controller is
    down

 drivers/nvme/host/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.16.4


_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

             reply	other threads:[~2020-06-04 11:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04 11:56 Hannes Reinecke [this message]
2020-06-04 11:56 ` [PATCH 1/2] nvme: check for NVME_CTRL_LIVE in nvme_report_ns_ids() Hannes Reinecke
2020-06-04 13:22   ` Keith Busch
2020-06-04 13:48     ` Hannes Reinecke
2020-06-04 13:57       ` Keith Busch
2020-06-04 15:38         ` Hannes Reinecke
2020-06-04 16:58   ` Sagi Grimberg
2020-06-05  6:20     ` Hannes Reinecke
2020-06-04 11:56 ` [PATCH 2/2] nvme: do not update multipath disk information if the controller is down Hannes Reinecke
2020-06-04 16:53 ` [PATCH 0/2] nvme: fix reconnection stalls 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=20200604115602.78446-1-hare@suse.de \
    --to=hare@suse.de \
    --cc=daniel.wagner@suse.com \
    --cc=hch@lst.de \
    --cc=keith.busch@wdc.com \
    --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