public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: James Smart <jsmart2021@gmail.com>, linux-nvme@lists.infradead.org
Cc: Christoph Hellwig <hch@lst.de>, Keith Busch <kbusch@kernel.org>,
	Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
	Martin Belanger <nitram_67@hotmail.com>,
	Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH rfc 0/1] Fix missing AENs when discovery controllers are disconnected
Date: Wed, 14 Sep 2022 13:29:20 +0300	[thread overview]
Message-ID: <bf83b747-e6b5-57fb-0de7-e2fb646633aa@grimberg.me> (raw)
In-Reply-To: <27194422-3759-928e-c88e-c5d10feeba5b@gmail.com>


> I was thinking this rather than the new option... The bit would only be 
> set *after* the first successful link-side connect, thus the initial 
> nvme_start_ctrl would not send the reconnect event. Every reconnect 
> thereafter would.
> 
> -- james
> 
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 2429b11eb9a8..43c8b6590164 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -4814,6 +4814,10 @@ void nvme_start_ctrl(struct nvme_ctrl *ctrl)
> 
>       nvme_enable_aen(ctrl);
> 
> +    if (nvme_discovery_ctrl(ctrl) &&
> +        test_bit(NVME_CTRL_FABRIC_CONNECTED, &ctrl->flags))
> +        nvme_change_uevent(ctrl, "NVME_EVENT=rediscover");
> +
>       if (ctrl->queue_count > 1) {
>           nvme_queue_scan(ctrl);
>           nvme_start_queues(ctrl);
> diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> index 127abaf9ba5d..ff1dd8f999b0 100644
> --- a/drivers/nvme/host/fc.c
> +++ b/drivers/nvme/host/fc.c
> @@ -2947,6 +2947,7 @@ nvme_fc_create_io_queues(struct nvme_fc_ctrl *ctrl)
>           goto out_delete_hw_queues;
> 
>       ctrl->ioq_live = true;
> +    set_bit(NVME_CTRL_FABRIC_CONNECTED, &ctrl->ctrl.flags);

Isn't this set before calling nvme_start_ctrl()?

But this is orthogonal to the user argument, is there a specific
reason to why not add an explicit argument requesting that?
Because every userspace that will setup a persistent discovery
controller will need this event?


  reply	other threads:[~2022-09-14 10:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07 14:24 [PATCH rfc 0/1] Fix missing AENs when discovery controllers are disconnected Sagi Grimberg
2022-09-07 14:24 ` [PATCH rfc 1/1] fabrics: support notify_rediscover connect parameter Sagi Grimberg
2022-09-07 14:24 ` [PATCH libnvme 2/1] nvme: Add generic connect parameter support detection Sagi Grimberg
2022-09-09  6:56   ` Daniel Wagner
2022-09-12 12:32     ` Sagi Grimberg
2022-09-12 14:19       ` Daniel Wagner
2022-09-07 14:24 ` [PATCH libnvme 3/1] fabrics: add notify_rediscover parameter Sagi Grimberg
2022-09-09  6:58   ` Daniel Wagner
2022-09-12 12:33     ` Sagi Grimberg
2022-09-12 14:42       ` Daniel Wagner
2022-09-07 14:24 ` [PATCH nvme-cli 4/1] fabrics: re-read the discovery log page when a discovery controller reconnected Sagi Grimberg
2022-09-10 15:47 ` [PATCH rfc 0/1] Fix missing AENs when discovery controllers are disconnected James Smart
2022-09-12 12:39   ` Sagi Grimberg
2022-09-13  0:06     ` James Smart
2022-09-14 10:29       ` Sagi Grimberg [this message]
2022-09-14 15:00         ` James Smart
2022-09-14 15:31           ` Sagi Grimberg
2022-09-14 17:26             ` James Smart
2022-09-18 14:12               ` 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=bf83b747-e6b5-57fb-0de7-e2fb646633aa@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=jsmart2021@gmail.com \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=nitram_67@hotmail.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