When a server boot/reboot, nvme driver async probe would case linux drive letter drift. First boot: nvme nvme0: pci function 0000:03:00.0 nvme nvme1: pci function 0000:04:00.0 nvme nvme2: pci function 0000:81:00.0 Second boot: nvme nvme0: pci function 0000:03:00.0 nvme nvme1: pci function 0000:81:00.0 nvme nvme2: pci function 0000:04:00.0 Some cases, the server need the nvme letter order can sort by pci bus(Bus:Dev.Fun), nvme driver need probe synchronous in this time. Add a module_param option probe_mode to allow nvme probe sync or async. nvme.probe_mode = { default | async | sync } default, probe_type = PROBE_DEFAULT_STRATEGY async, probe_type = PROBE_PREFER_ASYNCHRONOUS sync, probe_type = PROBE_FORCE_SYNCHRONOUS
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/4040