[PATCH] nvme: introduce generic per-namespace chardev
Keith Busch
kbusch at kernel.org
Tue Apr 20 19:58:13 BST 2021
On Tue, Apr 20, 2021 at 11:43:51PM +0530, Kanchan Joshi wrote:
> On Tue, Apr 20, 2021 at 3:37 PM Christoph Hellwig <hch at lst.de> wrote:
> >
> > From: Minwoo Im <minwoo.im.dev at gmail.com>
> >
> > Userspace has not been allowed to I/O to device that's failed to
> > be initialized. This patch introduces generic per-namespace character
> > device to allow userspace to I/O regardless the block device is there or
> > not.
>
> When an application uses this interface to issue passthrough IO, it
> needs to know the lba size (at least) to form the command correctly.
> But determining lba size would require an admin ioctl.
> Do you see there is a way to go about this issue?
You'd have to look up the parent controller and issue the command
through that.
If your application doesn't have permissions to open the controller,
then it wouldn't work.
So I guess all applications that can open generic namespaces would need
access to the controller handle. But if you do that, then is there a
point to this indirection anymore?
I have to agree, the ability to query your namespaces settings through
the namespace's handle really does simplify things...
More information about the Linux-nvme
mailing list