linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: Chao Leng <lengchao@huawei.com>, linux-nvme@lists.infradead.org
Cc: kbusch@kernel.org, axboe@fb.com, hch@lst.de
Subject: Re: [PATCH] nvme-rdma: fix deadlock when delete ctrl due to reconnect fail
Date: Mon, 27 Jul 2020 16:31:58 -0700	[thread overview]
Message-ID: <c129a034-ca6f-7323-91d4-8a899ede7777@grimberg.me> (raw)
In-Reply-To: <e477f1b3-f351-1aa3-6132-d7e729db11b9@grimberg.me>


>> diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
>> index f8f856dc0c67..b381e2cde50a 100644
>> --- a/drivers/nvme/host/rdma.c
>> +++ b/drivers/nvme/host/rdma.c
>> @@ -989,8 +989,7 @@ static void nvme_rdma_teardown_io_queues(struct 
>> nvme_rdma_ctrl *ctrl,
>>                   nvme_cancel_request, &ctrl->ctrl);
>>               blk_mq_tagset_wait_completed_request(ctrl->ctrl.tagset);
>>           }
>> -        if (remove)
>> -            nvme_start_queues(&ctrl->ctrl);
>> +        nvme_start_queues(&ctrl->ctrl);
> 
> This will fail I/O during controller reset, so nak on this.

Can you try this:
--
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index d58231636d11..96c0d664fe9b 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -1149,6 +1149,11 @@ static void nvme_rdma_reconnect_ctrl_work(struct 
work_struct *work)
         return;

  requeue:
+       /*
+        * make sure queues are not quiesced due to a reconnect
+        * sequence that failed after creating some I/O queues
+        */
+       nvme_start_queues(ctrl);
         dev_info(ctrl->ctrl.device, "Failed reconnect attempt %d\n",
                         ctrl->ctrl.nr_reconnects);
         nvme_rdma_reconnect_or_remove(ctrl);
--

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2020-07-27 23:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27  8:09 [PATCH] nvme-rdma: fix deadlock when delete ctrl due to reconnect fail Chao Leng
2020-07-27 18:44 ` Sagi Grimberg
2020-07-27 23:31   ` Sagi Grimberg [this message]
2020-07-28  3:06     ` Chao Leng
2020-07-28  3:32       ` Sagi Grimberg
     [not found]         ` <1288e338-9e92-eeeb-6f7b-86590c6e1a4c@broadcom.com>
2020-07-28 16:27           ` 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=c129a034-ca6f-7323-91d4-8a899ede7777@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=lengchao@huawei.com \
    --cc=linux-nvme@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).