From: hch@infradead.org (Christoph Hellwig)
Subject: [PATCH-4.7 2/3] NVMe: Short-cut removal on surprise hot-unplug
Date: Thu, 12 May 2016 00:06:18 -0700 [thread overview]
Message-ID: <20160512070618.GD20802@infradead.org> (raw)
In-Reply-To: <20160510191627.GB21426@localhost.localdomain>
On Tue, May 10, 2016@03:16:27PM -0400, Keith Busch wrote:
> On Tue, May 03, 2016@01:01:40AM -0700, Christoph Hellwig wrote:
> > > @@ -1584,6 +1593,9 @@ void nvme_remove_namespaces(struct nvme_ctrl *ctrl)
> > > {
> > > struct nvme_ns *ns, *next;
> > >
> > > + if (ctrl->state == NVME_CTRL_DEAD)
> > > + nvme_kill_queues(ctrl);
> > > +
> > > mutex_lock(&ctrl->namespaces_mutex);
> > > list_for_each_entry_safe(ns, next, &ctrl->namespaces, list)
> > > nvme_ns_remove(ns);
> >
> > Not happy about so much magic.. At least add comments explaining why
> > you're doing this, and that it's just an optimization.
>
> We could just call nvme_kill_queues from the pci driver's nvme_remove
> instead of adding the state. I just thought this was universally useful
> for a non-graceful disconnect.
I think it's useful, it's just a little too magic to go without a
comment. Can you add comments explaining it and resend?
next prev parent reply other threads:[~2016-05-12 7:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-02 17:12 Patches for 4.7 Keith Busch
2016-05-02 17:12 ` [PATCH-4.7 1/3] NVMe: Return ENODEV error on invalid namespace Keith Busch
2016-05-03 7:58 ` Christoph Hellwig
2016-05-03 14:19 ` Busch, Keith
2016-05-03 14:25 ` Christoph Hellwig
2016-05-02 17:12 ` [PATCH-4.7 2/3] NVMe: Short-cut removal on surprise hot-unplug Keith Busch
2016-05-03 8:01 ` Christoph Hellwig
2016-05-10 19:16 ` Keith Busch
2016-05-12 7:06 ` Christoph Hellwig [this message]
2016-05-02 17:12 ` [PATCH-4.7 3/3] NVMe: Set capacity to 0 on all unusable namespaces Keith Busch
2016-05-03 8:03 ` Christoph Hellwig
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=20160512070618.GD20802@infradead.org \
--to=hch@infradead.org \
/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