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 2/2] nvme: do not update multipath disk information if the controller is down
Date: Thu, 4 Jun 2020 13:56:02 +0200 [thread overview]
Message-ID: <20200604115602.78446-3-hare@suse.de> (raw)
In-Reply-To: <20200604115602.78446-1-hare@suse.de>
When nvme_revalidate_disk() is called while the controller is not live
we need to avoid revalidating the multipath head device, as any I/O
sent to the multipath device might not be possible and we would deadlock
trying to flush the scan thread during reconnect.
Reported-by: Martin George <martin.george@netapp.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
drivers/nvme/host/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index b811787505f7..4b5bca5f2e4f 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1971,7 +1971,7 @@ static int __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id)
blk_queue_chunk_sectors(ns->queue, rounddown_pow_of_two(iob));
nvme_update_disk_info(disk, ns, id);
#ifdef CONFIG_NVME_MULTIPATH
- if (ns->head->disk) {
+ if (ns->head->disk && ctrl->state == NVME_CTRL_LIVE) {
nvme_update_disk_info(ns->head->disk, ns, id);
blk_queue_stack_limits(ns->head->disk->queue, ns->queue);
revalidate_disk(ns->head->disk);
--
2.16.4
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent 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 [PATCH 0/2] nvme: fix reconnection stalls Hannes Reinecke
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 ` Hannes Reinecke [this message]
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-3-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