Skip to content

discoverd: drop the handling of the nvme "add" uevent - #4485

Open
martin-belanger wants to merge 1 commit into
linux-nvme:masterfrom
martin-belanger:discoverd-drop-add-soak
Open

martin-belanger wants to merge 1 commit into
linux-nvme:masterfrom
martin-belanger:discoverd-drop-add-soak

Conversation

@martin-belanger

Copy link
Copy Markdown
Collaborator

nvme-discoverd never needed the "add" uevent. nvme connect returns only after the controller is added and identified, so its completion already gives the device and its sysfs attributes. The add handlers and their 1 s soak timer added nothing.

nvme-discoverd never needed the "add" uevent. nvme connect returns
only after the controller is added and identified, so its completion
already gives the device and its sysfs attributes. The add handlers
and their 1 s soak timer added nothing.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
@igaw

igaw commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

Does this also work with FC? FC behaves differently. I am all for making FC behave the same way as TCP/RDMA.

@martin-belanger

Copy link
Copy Markdown
Collaborator Author

Does this also work with FC? FC behaves differently. I am all for making FC behave the same way as TCP/RDMA.

Yes. The "add" uevent comes from the kernel's nvme_add_ctrl() (drivers/nvme/host/core.c), before the first connect, on FC as on TCP. It only means that /dev/nvmeX has been assigned. The controller is not connected yet, and the connect may still fail. So the event never said the controller was ready, and dropping it changes nothing for FC.

FC does differ in one point: if the first connect attempt fails, nvme connect still returns success and the controller stays in CONNECTING. When the connection comes up later, the kernel sends NVME_EVENT=connected, and discoverd ignores that event today. This was already the case before this PR.

This PR is safe to merge. The 1 s soak after "add" did not help anyway: it ran once, read cntrltype, which stays "reserved" until Identify succeeds, and did nothing more than the job completion does. After this PR is merged, I will send a follow-up that handles the "connected" event. FC and TCP then behave the same.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants