From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH 4/4] NVMe: Remove disks before shutdown
Date: Mon, 18 May 2015 13:30:23 -0600 [thread overview]
Message-ID: <1431977423-31587-5-git-send-email-keith.busch@intel.com> (raw)
In-Reply-To: <1431977423-31587-1-git-send-email-keith.busch@intel.com>
On orderly removal, we need to shut down the controller after disks are
deleted to prevent deadlock on a filesystem sync.
Signed-off-by: Keith Busch <keith.busch at intel.com>
---
drivers/block/nvme-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index 767ea54..62a147d 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -2960,8 +2960,8 @@ static void nvme_remove_disks(struct work_struct *ws)
{
struct nvme_dev *dev = container_of(ws, struct nvme_dev, reset_work);
- nvme_free_queues(dev, 1);
nvme_dev_remove(dev);
+ nvme_free_queues(dev, 1);
}
static int nvme_dev_resume(struct nvme_dev *dev)
@@ -3126,8 +3126,8 @@ static void nvme_remove(struct pci_dev *pdev)
flush_work(&dev->probe_work);
flush_work(&dev->scan_work);
flush_work(&dev->reset_work);
- nvme_dev_shutdown(dev);
nvme_dev_remove(dev);
+ nvme_dev_shutdown(dev);
nvme_dev_remove_admin(dev);
device_destroy(nvme_class, MKDEV(nvme_char_major, dev->instance));
nvme_free_queues(dev, 0);
--
1.7.10.4
prev parent reply other threads:[~2015-05-18 19:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-18 19:30 [PATCH 0/4] Namespace handling updates and fixes Keith Busch
2015-05-18 19:30 ` [PATCH 1/4] blk: Define blk_set_queue_dying in header Keith Busch
2015-05-18 19:30 ` [PATCH 2/4] NVMe: Decouple nvmeq hctx from ns request queue Keith Busch
2015-05-19 7:46 ` Christoph Hellwig
2015-05-19 15:35 ` Keith Busch
2015-05-19 15:51 ` Keith Busch
2015-05-19 16:15 ` Christoph Hellwig
2015-05-19 16:14 ` Christoph Hellwig
2015-05-18 19:30 ` [PATCH 3/4] NVMe: Automatic namespace rescan Keith Busch
2015-05-18 19:30 ` Keith Busch [this message]
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=1431977423-31587-5-git-send-email-keith.busch@intel.com \
--to=keith.busch@intel.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