[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1f447780-09a2-4f97-a17d-5489ebd4da5f@kernel.org>
Date: Fri, 25 Jul 2025 10:57:47 +0900
From: Damien Le Moal <dlemoal@...nel.org>
To: Bart Van Assche <bvanassche@....org>, likunyu10 <likunyu10@....com>,
kbusch@...nel.org, axboe@...nel.dk, hch@....de, sagi@...mberg.me
Cc: linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org,
likunyu15 <likunyu15@...com>
Subject: Re: [PATCH] drivers/nvme/host/pci: Fix the asynchronous detection
issue of nvme devices
On 7/25/25 01:07, Bart Van Assche wrote:
> On 7/20/25 11:51 AM, likunyu10 wrote:
>> PROBE_PREFER_ASYNCHRONOUS asynchronous detection has a significant impact
>> on important devices. For example, if a server has two or more nvme disk
>> devices, it can cause disk loading disorder, which can also have a
>> certain impact on actual production environments.
>
> That's intentional. Please fix your user space code that uses hard-coded
> NVMe block device names or introduce a mechanism in user space for block
> devices that is similar to the predictable network interface names
> mechanism. See also https://systemd.io/PREDICTABLE_INTERFACE_NAMES/.
Userspace can use /dev/disk/by-id or any of the other /dev/disk/by-* for
reliable device names. Using directly /dev/sd* or /dev/nvme* is bad userspace
practice.
Even without asynchronous device scan, adding or removing a device to a system
can change device file names. The symlinks in /dev/disk/by-id are stable and
will exist as long as a device is present.
--
Damien Le Moal
Western Digital Research
Powered by blists - more mailing lists