]> 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)
commitd20ff5a18994f897f7f6609ec37cb1e06379e39e
tree78f740284dd55f02b1997b986930f46bc6bbc077
parente7b693b7851d4e884a39506504584be31a1fb208
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