nvme: track subsystems
authorChristoph Hellwig <hch@lst.de>
Thu, 9 Nov 2017 12:48:55 +0000 (13:48 +0100)
committerJens Axboe <axboe@kernel.dk>
Sat, 11 Nov 2017 02:53:25 +0000 (19:53 -0700)
commitab9e00cc72fa4c6eb6370757b9e94c4645e91d5d
tree968969f6db8220c5b7b08c11fd821d077c721a3d
parent9a95e4ef709533efac4aafcb8bddf73f96db50ed
nvme: track subsystems

This adds a new nvme_subsystem structure so that we can track multiple
controllers that belong to a single subsystem.  For now we only use it
to store the NQN, and to check that we don't have duplicate NQNs unless
the involved subsystems support multiple controllers.

Includes code originally from Hannes Reinecke to expose the subsystems
in sysfs.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c
drivers/nvme/host/fabrics.c
drivers/nvme/host/nvme.h