[PATCH 13/13] nvme: introduce generic per-namespace chardev

Christoph Hellwig hch at lst.de
Thu Apr 8 18:00:14 BST 2021


On Fri, Apr 09, 2021 at 01:56:13AM +0900, Keith Busch wrote:
> On Thu, Apr 08, 2021 at 02:08:42PM +0200, Christoph Hellwig wrote:
> > +int nvme_cdev_add(struct cdev *cdev, struct device *cdev_device,
> > +		const struct file_operations *fops, struct module *owner)
> > +{
> > +	int minor, ret;
> > +
> > +	minor = ida_simple_get(&nvme_ns_chr_minor_ida, 0, 0, GFP_KERNEL);
> 
> Do we really need to allocate a minor specific for this char dev? It
> looks like the ns->head->instance can provide the unique value.

Indeed.  I think we can just kill off this IDA, let me give that a spin.



More information about the Linux-nvme mailing list