mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rakesh Pandit <rakesh@tuxera.com>
To: Christoph Hellwig <hch@lst.de>
Cc: <linux-nvme@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	Keith Busch <keith.busch@intel.com>, Jens Axboe <axboe@fb.com>,
	Sagi Grimberg <sagi@grimberg.me>
Subject: Re: [PATCH 1/2] nvme: fix multiple ctrl removal scheduling
Date: Wed, 24 May 2017 13:25:00 +0300	[thread overview]
Message-ID: <20170524102500.GA26375@dhcp-216.srv.tuxera.com> (raw)
In-Reply-To: <20170524093755.GA17483@lst.de>

On Wed, May 24, 2017 at 11:37:55AM +0200, Christoph Hellwig wrote:
> On Wed, May 24, 2017 at 01:15:47AM +0300, Rakesh Pandit wrote:
> > Commit c5f6ce97c1210 tries to address multiple resets but fails as
> > work_busy doesn't involve any synchronization and can fail.  This is
> > reproducible easily as can be seen by WARNING below which is triggered
> > with line:
> > 
> > WARN_ON(dev->ctrl.state == NVME_CTRL_RESETTING)
> > 
> > Allowing multiple resets can result in multiple controller removal as
> > well if different conditions inside nvme_reset_work fail and which
> > might deadlock on device_release_driver.
> > 
> > This patch addresses the problem by using state of controller to
> > decide whether reset should be queued or not as state change is
> > synchronizated using controller spinlock.
> 
> But we don't hold the lock over the check and the decision.  I suspect

Thanks, right.

> what we need to do is to actually change to the resetting state
> before queueing up the reset work.  Can you give that a spin?

Sure, will post it in next version.

      reply	other threads:[~2017-05-24 11:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23 22:15 Rakesh Pandit
2017-05-24  9:37 ` Christoph Hellwig
2017-05-24 10:25   ` Rakesh Pandit [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=20170524102500.GA26375@dhcp-216.srv.tuxera.com \
    --to=rakesh@tuxera.com \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=keith.busch@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®