[PATCH] nvme: add support namespace management to sysfs
Minwoo Im
minwoo.im.dev at gmail.com
Sat Feb 20 11:07:46 EST 2021
On 21-02-21 00:50:27, Keith Busch wrote:
> On Sun, Feb 21, 2021 at 12:40:04AM +0900, Minwoo Im wrote:
> > Namespaces are generally managed by scan_work. If admin needs to attach
> > namespace to controller, admin command like `nvme-cli` should be issued
> > with rescanning controller.
> >
> > If admin issues a Namespace Attachment command with detach option to a
> > namespace through IOCTL, kernel is not aware of it. In this case, block
> > device for the namespace becomes meaningless, but still shown in the
> > kernel space as maintained. After the rescanning the controller
> > manually, namespace node will be removed from the driver and user-space
> > will not be able to I/O to the namespace.
> >
> > Add support for namespace management (attach/detach) to sysfs of
> > controller instance to make it easy to attach/detach namespaces with
> > kernel-aware rather than non-kernel-aware passthru via IOCTL. Also, it
> > provides closer relationship between the device and kernel for the
> > namespace perspective (tightly coupled).
>
> Nak. The kernel should be aware of the altered namespace inventory via
> Command Effects Log or Namespace Notify AER. If the controller doesn't
> support either of these, then the user gets to do a manual rescan, which
> is not difficult task either.
Thanks Keith for your review. I think I missed NVME_CMD_EFFECTS_NIC
part in passthru code. Sorry for the noises.
More information about the Linux-nvme
mailing list