From: hare@suse.de (Hannes Reinecke)
Subject: [PATCH] nvme: schedule requeue whenever a LIVE state is entered
Date: Fri, 22 Mar 2019 22:14:11 +0100 [thread overview]
Message-ID: <e03e9ab7-8973-097e-6ffb-60eec0ab47e5@suse.de> (raw)
In-Reply-To: <8fa7e09f-3621-f37b-9830-64377ce8cfd6@grimberg.me>
On 3/22/19 7:57 PM, Sagi Grimberg wrote:
>>>> When undergoing state transitions I/O might be requeued, hence
>>>> we always have to schedule requeue_work whenever the nvme device
>>>> is live, independent on whether the old state was live or not.
>>>
>>> Any reason why not simply update from live to live?
>>>
>> ?
>>
>> I somewhat fail to parse the answer.
>> Care to elaborate?
>
> --
> diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
> index 2839bb70badf..f0716f6ce41f 100644
> --- a/drivers/nvme/host/multipath.c
> +++ b/drivers/nvme/host/multipath.c
> @@ -404,15 +404,12 @@ static inline bool nvme_state_is_live(enum
> nvme_ana_state state)
> ?static void nvme_update_ns_ana_state(struct nvme_ana_group_desc *desc,
> ??????????????? struct nvme_ns *ns)
> ?{
> -?????? enum nvme_ana_state old;
> -
> ??????? mutex_lock(&ns->head->lock);
> -?????? old = ns->ana_state;
> ??????? ns->ana_grpid = le32_to_cpu(desc->grpid);
> ??????? ns->ana_state = desc->state;
> ??????? clear_bit(NVME_NS_ANA_PENDING, &ns->flags);
>
> -?????? if (nvme_state_is_live(ns->ana_state) && !nvme_state_is_live(old))
> +?????? if (nvme_state_is_live(ns->ana_state))
> ??????????????? nvme_mpath_set_live(ns);
> ??????? mutex_unlock(&ns->head->lock);
> ?}
> --
That's what we tried initially (cf thread "[PATCH] nvme-multipath: relax
ANA state check"), but got rejected by Christoph.
Cheers,
Hannes
next prev parent reply other threads:[~2019-03-22 21:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-21 14:10 [PATCH] nvme: schedule requeue whenever a LIVE state is entered Hannes Reinecke
2019-03-21 21:26 ` Sagi Grimberg
2019-03-22 6:55 ` Hannes Reinecke
2019-03-22 18:57 ` Sagi Grimberg
2019-03-22 21:14 ` Hannes Reinecke [this message]
2019-03-25 15:55 ` Sagi Grimberg
2019-03-27 8:37 ` Christoph Hellwig
2019-03-27 8:44 ` Hannes Reinecke
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=e03e9ab7-8973-097e-6ffb-60eec0ab47e5@suse.de \
--to=hare@suse.de \
/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