[PATCH V6 1/2] nvme: enable char device per namespace

Minwoo Im minwoo.im.dev at gmail.com
Thu Mar 25 12:33:29 GMT 2021


On 21-03-25 12:25:24, Niklas Cassel wrote:
> On Mon, Mar 01, 2021 at 08:24:51PM +0100, javier at javigon.com wrote:
> > From: Javier González <javier.gonz at samsung.com>
> > 
> > Create a char device per NVMe namespace. This char device is always
> > initialized, independently of whether the features implemented by the
> > device are supported by the kernel. User-space can therefore always
> > issue IOCTLs to the NVMe driver using the char device.
> > 
> > The char device is presented as /dev/nvme-generic-XcYnZ. This naming
> > scheme follows the convention of the hidden device (nvmeXcYnZ). Support
> > for multipath will follow.
> 
> Do we perhaps want to put these new character devices inside a subdir?
> e.g. /dev/nvme/nvme-generic-XcYnZ ?
> 
> Otherwise it feels like doing such a simple thing as ls -al /dev/nvme*
> will show a lot of devices because of these new specialized char devices.

Good point.  If we have thousands of namespaces, it will create 2 times
of the blkdevs.  I would hear what maintainers say about this :)

FYI: new version has been posted with V1 by re-create this series with
Javier.  Please have a discuss there:

    https://lore.kernel.org/linux-nvme/20210325123048.94784-1-minwoo.im.dev@gmail.com/T/#u

Thanks!

> 
> 
> Kind regards,
> Niklas



More information about the Linux-nvme mailing list