All of lore.kernel.org
 help / color / mirror / Atom feed
From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH 4/4] nvme: start ANATT timer on out-of-order state changes
Date: Thu, 7 Jun 2018 16:20:40 +0300	[thread overview]
Message-ID: <0d687603-cd79-c848-6cc1-8b6834a55c6f@grimberg.me> (raw)
In-Reply-To: <20180607073556.39050-5-hare@suse.de>



On 06/07/2018 10:35 AM, Hannes Reinecke wrote:
> If I/O is terminated due to an invalid ANA state we should be starting
> the ANATT timer as we really should have received an ANA AEN signalling
> the state change.
> 
> Signed-off-by: Hannes Reinecke <hare at suse.com>
> ---
>   drivers/nvme/host/multipath.c | 36 +++++++++++++++++++++++++++++-------
>   1 file changed, 29 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
> index 7a37f5959ad4..7f34ae260ca9 100644
> --- a/drivers/nvme/host/multipath.c
> +++ b/drivers/nvme/host/multipath.c
> @@ -49,7 +49,10 @@ static void nvme_update_ana_state(struct nvme_ns *ns, enum nvme_ana_state state)
>   void nvme_failover_req(struct request *req)
>   {
>   	struct nvme_ns *ns = req->q->queuedata;
> +	struct device *dev = disk_to_dev(ns->disk);
>   	unsigned long flags;
> +	enum nvme_ana_state ana_state;
> +	bool ana_state_changed = false;
>   
>   	spin_lock_irqsave(&ns->head->requeue_lock, flags);
>   	blk_steal_bios(&ns->head->requeue_list, req);
> @@ -60,26 +63,45 @@ void nvme_failover_req(struct request *req)
>   	 * Reset the controller for any non-ANA error as we don't know what
>   	 * caused the error:
>   	 */
> +	ana_state = READ_ONCE(ns->ctrl->ana_state[ns->anagrpid]);
>   	switch (nvme_req(req)->status & 0x7ff) {
>   	case NVME_SC_ANA_TRANSITION:
> -		nvme_update_ana_state(ns, NVME_ANA_CHANGE);
> -		if (!timer_pending(&ns->anatt_timer)) {
> -			ns->anatt_timer.expires =
> -				ns->ctrl->anatt * HZ + jiffies;
> -			add_timer(&ns->anatt_timer);

Wasn't this added in the previous patch? its a bit confusing... can you
re-arrange the patches differently? maybe squash?

      parent reply	other threads:[~2018-06-07 13:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07  7:35 [PATCH 0/4] nvme: ANATT handling Hannes Reinecke
2018-06-07  7:35 ` [PATCH 1/4] nvmet: make ANATT configurable Hannes Reinecke
2018-06-07 12:06   ` Christoph Hellwig
2018-06-07 12:42     ` Hannes Reinecke
2018-06-07 13:03   ` Sagi Grimberg
2018-06-07  7:35 ` [PATCH 2/4] nvmet: ANA transition timeout handling Hannes Reinecke
2018-06-07 12:07   ` Christoph Hellwig
2018-06-07 13:31     ` Hannes Reinecke
2018-06-07 13:41       ` Christoph Hellwig
2018-06-07 13:12   ` Sagi Grimberg
2018-06-07  7:35 ` [PATCH 3/4] nvme: " Hannes Reinecke
2018-06-07 12:09   ` Christoph Hellwig
2018-06-07 12:52     ` Hannes Reinecke
2018-06-07 13:11       ` Christoph Hellwig
2018-06-07 13:16   ` Sagi Grimberg
2018-06-07 13:26     ` Christoph Hellwig
2018-06-07  7:35 ` [PATCH 4/4] nvme: start ANATT timer on out-of-order state changes Hannes Reinecke
2018-06-07 12:11   ` Christoph Hellwig
2018-06-07 12:37     ` Hannes Reinecke
2018-06-07 13:10       ` Christoph Hellwig
2018-06-07 13:20         ` Hannes Reinecke
2018-06-07 13:46           ` Christoph Hellwig
2018-06-07 14:01             ` Hannes Reinecke
2018-06-07 14:22               ` Christoph Hellwig
2018-06-07 15:20                 ` Sagi Grimberg
2018-06-07 13:20   ` Sagi Grimberg [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=0d687603-cd79-c848-6cc1-8b6834a55c6f@grimberg.me \
    --to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.