[PATCH v2 2/2] nvme: send a rediscover uevent when a persistent discovery controller reconnects

James Smart jsmart2021 at gmail.com
Thu Sep 22 08:05:55 PDT 2022


On 9/22/2022 1:15 AM, Sagi Grimberg wrote:
> When a discovery controller is disconnected, no AENs will arrive to
> notify the host about discovery log change events.
> 
> In order to solve this, send a uevent notification when a
> persistent discovery controller reconnects. We add a new ctrl
> flag NVME_CTRL_STARTED_ONCE that will be set on the first
> start, and consecutive calls will find it set, and send the
> event to userspace if the controller is a discovery controller.
> 
> Upon the event reception, userspace will re-read the discovery
> log page and will act upon changes as it sees fit.
> 
> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
> ---
>   drivers/nvme/host/core.c | 10 ++++++++++
>   drivers/nvme/host/nvme.h |  1 +
>   2 files changed, 11 insertions(+)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c


Reviewed-by: James Smart <jsmart2021 at gmail.com>

-- james





More information about the Linux-nvme mailing list