Repository navigation
discoverd: drop the handling of the nvme "add" uevent - #4485
martin-belanger wants to merge 1 commit into
Conversation
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>
|
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. |
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.