public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: Edmund Nadolski <edmund.nadolski@intel.com>,
	Christoph Hellwig <hch@lst.de>,
	linux-nvme@lists.infradead.org,
	James Smart <james.smart@broadcom.com>
Subject: Re: [PATCHv2 6/6] nvme: Wait for reset state when required
Date: Fri, 20 Sep 2019 15:06:46 -0600	[thread overview]
Message-ID: <20190920210645.GA30909@keith-busch> (raw)
In-Reply-To: <8bae471f-e7d6-89a3-81bc-498b9d42c392@grimberg.me>

On Fri, Sep 20, 2019 at 01:49:57PM -0700, Sagi Grimberg wrote:
> 
> > > > >    static void nvme_reset_done(struct pci_dev *pdev)
> > > > >    {
> > > > >    	struct nvme_dev *dev = pci_get_drvdata(pdev);
> > > > > -	nvme_reset_ctrl_sync(&dev->ctrl);
> > > > > +
> > > > > +	if (!nvme_reset_continue(&dev->ctrl))
> > > > > +		flush_work(&dev->ctrl.reset_work);
> > > > 
> > > > Is nvme_reset_continue allowed to fail here?
> > > > As I see it, the flush must complete regardless doesn't it?
> > > 
> > > I was thinking a surprise hot-removal, but no, the pci driver is holding
> > > the device lock across the prepare/done sequence, so I don't think it's
> > > possible for this reset_continue() to fail to schedule.
> > 
> > Oh wait, there actually is a way, and I even accounted for it in this
> > patch, but just forgot about it. If we start an FLR while the controller
> > is CONNECTING, and if that CONNECTING fails, we'll transition to DELETING.
> > So yeah, reset_continue could fail.
> 
> And nvme_remove() will flush the reset_work?

If scheduled, yes, nvme_remove() flushes reset_work.

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

  reply	other threads:[~2019-09-20 21:06 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-19 21:34 [PATCHv2 0/6] nvme: double reset prevention kbusch
2019-09-19 21:34 ` [PATCHv2 1/6] nvme-pci: Free tagset if no IO queues kbusch
2019-09-20 17:49   ` Sagi Grimberg
2019-09-20 17:53     ` Keith Busch
2019-09-20 17:56       ` Sagi Grimberg
2019-09-27 21:33   ` Christoph Hellwig
2019-09-19 21:34 ` [PATCHv2 2/6] nvme: Remove ADMIN_ONLY state kbusch
2019-09-20 17:53   ` Sagi Grimberg
2019-09-27 21:35   ` Christoph Hellwig
2019-09-19 21:34 ` [PATCHv2 3/6] nvme: Restart request timers in resetting state kbusch
2019-09-20 17:53   ` Sagi Grimberg
2019-09-27 21:36   ` Christoph Hellwig
2019-09-19 21:34 ` [PATCHv2 4/6] nvme: Introduce nvme_reset_continue kbusch
2019-09-20 18:15   ` Sagi Grimberg
2019-09-27 21:37   ` Christoph Hellwig
2019-09-27 21:44   ` Christoph Hellwig
2019-09-19 21:34 ` [PATCHv2 5/6] nvme: Prevent resets during paused states kbusch
2019-09-20 18:03   ` Sagi Grimberg
2019-09-20 18:05   ` Sagi Grimberg
2019-09-20 18:08     ` Keith Busch
2019-09-20 18:14       ` Sagi Grimberg
2019-09-27 21:41   ` Christoph Hellwig
2019-09-28  0:23     ` Keith Busch
2019-10-10 12:03       ` Judy Brock
2019-10-10 13:59         ` Keith Busch
2019-10-10 14:03           ` Christoph Hellwig
2019-10-11  0:51           ` Judy Brock
2019-10-11 14:23             ` Keith Busch
2019-09-19 21:34 ` [PATCHv2 6/6] nvme: Wait for reset state when required kbusch
2019-09-20 18:13   ` Sagi Grimberg
2019-09-20 18:26     ` Keith Busch
2019-09-20 19:29       ` Keith Busch
2019-09-20 20:49         ` Sagi Grimberg
2019-09-20 21:06           ` Keith Busch [this message]
2019-09-27 21:43   ` Christoph Hellwig
2019-09-20 17:51 ` [PATCHv2 0/6] nvme: double reset prevention Sagi Grimberg
2019-09-20 17:54   ` Keith Busch
2019-09-23 22:09 ` Sagi Grimberg
2019-09-24 15:07   ` Keith Busch
2019-09-24 18:07     ` Sagi Grimberg
2019-09-24 18:12       ` Keith Busch

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=20190920210645.GA30909@keith-busch \
    --to=kbusch@kernel.org \
    --cc=edmund.nadolski@intel.com \
    --cc=hch@lst.de \
    --cc=james.smart@broadcom.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