[PATCH] nvme: introduce passthrough ioctl for multipath

Keith Busch kbusch at kernel.org
Mon Feb 15 12:02:33 EST 2021


On Sun, Feb 14, 2021 at 08:01:25PM +0900, Minwoo Im wrote:
> We don't allow NVME_IOCTL_IO_CMD ioctl in case that a controller has
> multiple namespaces attached.  Also, I/O request to the controller
> character device has not been recommended and deprecated because we have
> block device to I/O with where the multipath consideration is taken.
> 
> Once kernel decided a path to I/O for a namespace based on the I/O
> policy of a NVMe subsystem, userspace is not allowed to choose a path to
> I/O.  If a path is broken(inaccessible state in ANA), then it will not
> try to I/O to that path.
> 
> This patch introduced NVME_IOCTL_MPATH_IO command for controller
> device(e.g., /dev/nvme0) to support multipath I/O passthrough for
> userspace.  Regardless driver's path decision, userspace can target a
> namespace to I/O.  In this case, `cmd.nsid` will be used to find out the
> namespace instance target which is hidden(e.g., nvmeXcYnZ).

IO commands are not allowed through the character handle with the
existing ioctls. A new ioctl doesn't make it okay. If it was okay, then
we could just remove the limitation in the current ones.



More information about the Linux-nvme mailing list