summaryrefslogtreecommitdiff
path: root/drivers/nvme/target/nvmet.h
diff options
context:
space:
mode:
authorLogan Gunthorpe <logang@deltatee.com>2020-07-24 11:25:19 -0600
committerChristoph Hellwig <hch@lst.de>2020-07-29 07:45:21 +0200
commitcae5b01a2afc2058bee94b4b8f873d3a4a9ec41e (patch)
tree78f740284dd55f02b1997b986930f46bc6bbc077 /drivers/nvme/target/nvmet.h
parentba76af676cd0514614b5a99b8adad9d3956f5d7d (diff)
downloadlwn-cae5b01a2afc2058bee94b4b8f873d3a4a9ec41e.tar.gz
lwn-cae5b01a2afc2058bee94b4b8f873d3a4a9ec41e.zip
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>
Diffstat (limited to 'drivers/nvme/target/nvmet.h')
-rw-r--r--drivers/nvme/target/nvmet.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/target/nvmet.h b/drivers/nvme/target/nvmet.h
index 9d0aa6560c0c..47ee3fb193bd 100644
--- a/drivers/nvme/target/nvmet.h
+++ b/drivers/nvme/target/nvmet.h
@@ -248,6 +248,7 @@ struct nvmet_subsys {
#ifdef CONFIG_NVME_TARGET_PASSTHRU
struct nvme_ctrl *passthru_ctrl;
char *passthru_ctrl_path;
+ struct config_group passthru_group;
#endif /* CONFIG_NVME_TARGET_PASSTHRU */
};