Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: jianchao.w.wang@oracle.com (jianchao.wang)
Subject: [PATCH 2/9] nvme: fix the deadlock in nvme_update_formats
Date: Mon, 12 Feb 2018 09:40:37 +0800	[thread overview]
Message-ID: <a74830c3-ae4e-68ca-866d-669c7007e2c4@oracle.com> (raw)
In-Reply-To: <6cc12ce7-07ca-35ac-0bae-c6d875854504@grimberg.me>

Hi Sagi

Thanks for your kindly response and directive.
That's really appreciated.

On 02/11/2018 07:16 PM, Sagi Grimberg wrote:
>> ????? mutex_lock(&ctrl->namespaces_mutex);
>> ????? list_for_each_entry(ns, &ctrl->namespaces, list) {
>> -??????? if (ns->disk && nvme_revalidate_disk(ns->disk))
>> -??????????? nvme_ns_remove(ns);
>> +??????? if (ns->disk && nvme_revalidate_disk(ns->disk)) {
>> +??????????? list_del_init(&ns->list);
>> +??????????? list_add_tail(&ns->list, &rm_list);
> 
> list_move_tail?

Yes, I will use this interface next version, as well as the 1st patch.

Sincerely
Jianchao

> 
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme at lists.infradead.org
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.infradead.org_mailman_listinfo_linux-2Dnvme&d=DwICAg&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=7WdAxUBeiTUTCy8v-7zXyr4qk7sx26ATvfo6QSTvZyQ&m=w-s8SrsXdziNNWDrav4KevPTjbt0WNbNQsEmXKL--FY&s=o0wVdE60HzA9inklf3xGMxQjy6l6JHNoDICmOHDBZMA&e=
> 

  reply	other threads:[~2018-02-12  1:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-11  9:38 [PATCH V3 0/6]nvme-pci: fixes on nvme_timeout and nvme_dev_disable Jianchao Wang
2018-02-11  9:38 ` [PATCH 1/9] nvme: fix the dangerous reference of namespaces list Jianchao Wang
2018-02-11 11:14   ` Sagi Grimberg
2018-02-11 11:15   ` Sagi Grimberg
2018-02-11  9:38 ` [PATCH 2/9] nvme: fix the deadlock in nvme_update_formats Jianchao Wang
2018-02-11 11:16   ` Sagi Grimberg
2018-02-12  1:40     ` jianchao.wang [this message]
2018-02-11  9:38 ` [PATCH 3/9] nvme: change namespaces_mutext to namespaces_rwsem Jianchao Wang
2018-02-11 11:17   ` Sagi Grimberg
2018-02-12  2:33     ` jianchao.wang
2018-02-11  9:38 ` [PATCH 4/9] nvme-pci: quiesce IO queues prior to disabling device HMB accesses Jianchao Wang
2018-02-11 11:19   ` Sagi Grimberg
2018-02-12  2:17     ` jianchao.wang
2018-02-11  9:38 ` [PATCH 5/9] nvme-pci: suspend queues based on online_queues Jianchao Wang
2018-02-11  9:38 ` [PATCH 6/9] nvme-pci: drain the entered requests after ctrl is shutdown Jianchao Wang
2018-02-11  9:38 ` [PATCH 7/9] blk-mq: make blk_mq_rq_update_aborted_gstate a external interface Jianchao Wang
2018-02-11  9:38 ` [PATCH 8/9] nvme-pci: break up nvme_timeout and nvme_dev_disable Jianchao Wang
2018-02-11 11:36   ` Sagi Grimberg
2018-02-12  2:16     ` jianchao.wang
2018-02-12  7:51       ` jianchao.wang
2018-02-11  9:38 ` [PATCH 9/9] nvme-pci: discard wait timeout when delete cq/sq Jianchao Wang
2018-02-11 11:24   ` 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=a74830c3-ae4e-68ca-866d-669c7007e2c4@oracle.com \
    --to=jianchao.w.wang@oracle.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