From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH RFC] nvme-rdma: Queue ns scanning after a sucessful reconnection
Date: Sun, 7 Aug 2016 12:12:35 +0300 [thread overview]
Message-ID: <ce424fe1-d6e8-706f-18f8-aa9c880bcdec@grimberg.me> (raw)
In-Reply-To: <1470330508.19927.18.camel@linux.intel.com>
>> On an ordered target shutdown, the target can send a AEN on a
>> namespace
>> removal, this will trigger the host to queue ns-list query. The
>> shutdown
>> will trigger error recovery which will attepmt periodic reconnect.
>>
>> We can hit a race where the ns rescanning fails (error recovery
>> kicked
>> in and we're not connected) causing removing all the namespaces and
>> when
>> we reconnect we won't see any namespaces for this controller.
>>
>> So, queue a namespace rescan after we successfully reconnected to the
>> target.
>>
>> Note, that unlike user initiated controller reset, we don't need to
>> trigger
>> namespace scanning (until the point I noticed the above at least)
>> because we
>> reconnect to an existing controller. However due to the interaction
>> with
>> the aen mechanism we queue ns scan here as well.
>>
>> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
>> ---
>> I'm open to other suggestions if anyone has any...
>
> this sounds like a fix that should really go in the core target code
> instead of RDMA code as this could affect any implementation layer.
But it fixes the host behavior (nvme-rdma).
> If the target is shutting down I'm not sure why it would enter error
> recovery which would attempt a reconnect. If the target is shutting
> down, shut down. Maybe the keep-alive timer needs to stop
> (nvmet_stop_keep_alive_timer()???). I could see the benefit of the
> target emitting an AEN to tell the host to rescan for namespaces so it
> doesn't keep a stale list of namespaces after shutdown.
Its not the target entering error recovery, its the host. What would
you expect from a host that suddenly was disconnected by the target?
Not sure what other than periodic reconnects would be adequate...
The patch here just requeue ns scanning when we successfully reconnected
to the target that was restored.
next prev parent reply other threads:[~2016-08-07 9:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-31 15:55 [PATCH RFC] nvme-rdma: Queue ns scanning after a sucessful reconnection Sagi Grimberg
2016-08-01 11:14 ` Christoph Hellwig
2016-08-04 17:08 ` J Freyensee
2016-08-07 9:12 ` Sagi Grimberg [this message]
2016-08-08 19:43 ` J Freyensee
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=ce424fe1-d6e8-706f-18f8-aa9c880bcdec@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 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).