Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: jonathan.derrick@intel.com (Jon Derrick)
Subject: [PATCH 2/5] nvme: introduce a controller state machine
Date: Tue, 26 Apr 2016 10:18:34 -0600	[thread overview]
Message-ID: <20160426161833.GA13324@localhost.localdomain> (raw)
In-Reply-To: <1461671520-4758-3-git-send-email-hch@lst.de>

Hi Christoph,

> @@ -1835,7 +1829,7 @@ static void nvme_reset_work(struct work_struct *work)
>  	struct nvme_dev *dev = container_of(work, struct nvme_dev, reset_work);
>  	int result = -ENODEV;
>  
> -	if (WARN_ON(test_bit(NVME_CTRL_RESETTING, &dev->flags)))
> +	if (WARN_ON(dev->ctrl.state == NVME_CTRL_RESETTING))
>  		goto out;
>  
>  	/*
> @@ -1845,7 +1839,8 @@ static void nvme_reset_work(struct work_struct *work)
>  	if (dev->ctrl.ctrl_config & NVME_CC_ENABLE)
>  		nvme_dev_disable(dev, false);
>  
> -	set_bit(NVME_CTRL_RESETTING, &dev->flags);
> +	if (!nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_RESETTING))
> +		goto out;
>  
Seems redundant to above WARN_ON test


Otherwise looks good

Acked-by Jon Derrick: <jonathan.derrick at intel.com>

  reply	other threads:[~2016-04-26 16:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26 11:51 proper controller state machine and more common code V2 Christoph Hellwig
2016-04-26 11:51 ` [PATCH 1/5] nvme: remove the io_incapable method Christoph Hellwig
2016-04-26 15:24   ` Jon Derrick
2016-04-26 21:19   ` Sagi Grimberg
2016-04-26 11:51 ` [PATCH 2/5] nvme: introduce a controller state machine Christoph Hellwig
2016-04-26 16:18   ` Jon Derrick [this message]
2016-04-27  7:50     ` Christoph Hellwig
2016-04-26 11:51 ` [PATCH 3/5] nvme: tighten up state check for namespace scanning Christoph Hellwig
2016-04-26 16:40   ` Jon Derrick
2016-04-27  7:51     ` Christoph Hellwig
2016-04-26 11:51 ` [PATCH 4/5] nvme: move namespace scanning to core Christoph Hellwig
2016-04-26 17:16   ` Jon Derrick
2016-04-26 11:52 ` [PATCH 5/5] nvme: move AER handling to common code Christoph Hellwig
2016-05-02 15:10 ` proper controller state machine and more common code V2 Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2016-04-18 12:34 proper controller state machine and more common code Christoph Hellwig
2016-04-18 12:34 ` [PATCH 2/5] nvme: introduce a controller state machine Christoph Hellwig
2016-04-18 18:36   ` Sagi Grimberg
2016-04-18 20:17     ` Christoph Hellwig
2016-04-18 20:30       ` Sagi Grimberg
2016-04-19 18:25         ` Christoph Hellwig
2016-04-19 18:35           ` Sagi Grimberg
2016-04-19 18:37             ` Christoph Hellwig
2016-04-20 17:25               ` 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=20160426161833.GA13324@localhost.localdomain \
    --to=jonathan.derrick@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