[PATCH] nvme: introduce passthrough ioctl for multipath
Minwoo Im
minwoo.im.dev at gmail.com
Tue Feb 16 04:51:47 EST 2021
On 21-02-15 09:02:33, Keith Busch wrote:
> 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.
Thanks for your feedback, Keith. If you don't mind, may I ask why it's
been entirely unsafe and deprecated in the exsiting
ioctl(NVME_IOCTL_IO_CMD)? I've seen a patch bfd8947194b2 ("nvme: fixes
for NVME_IOCTL_IO_CMD on the char device), but have no idea why it's
been really depreacted :)
More information about the Linux-nvme
mailing list