]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet: introduce the passthru configfs interface
authorLogan Gunthorpe <logang@deltatee.com>
Fri, 24 Jul 2020 17:25:19 +0000 (11:25 -0600)
committerChristoph Hellwig <hch@lst.de>
Wed, 29 Jul 2020 05:45:21 +0000 (07:45 +0200)
commit5586ae116f42fcfb6648ae11ac835b7d92a8efb7
tree78f740284dd55f02b1997b986930f46bc6bbc077
parent812fc0d976f1d3c275098388c894ba041176fa44
nvmet: introduce the passthru configfs interface

When CONFIG_NVME_TARGET_PASSTHRU as 'passthru' directory will
be added to each subsystem. The directory is similar to a namespace
and has two attributes: device_path and enable. The user must set the
path to the nvme controller's char device and write '1' to enable the
subsystem to use passthru.

Any given subsystem is prevented from enabling both a regular namespace
and the passthru device. If one is enabled, enabling the other will
produce an error.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/configfs.c
drivers/nvme/target/nvmet.h