diff options
author | Christoph Hellwig <hch@lst.de> | 2017-11-09 13:48:55 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-11-11 03:53:25 +0100 |
commit | ab9e00cc72fa4c6eb6370757b9e94c4645e91d5d (patch) | |
tree | 968969f6db8220c5b7b08c11fd821d077c721a3d /drivers/nvme/host/fabrics.c | |
parent | block, nvme: Introduce blk_mq_req_flags_t (diff) | |
download | linux-ab9e00cc72fa4c6eb6370757b9e94c4645e91d5d.tar.xz linux-ab9e00cc72fa4c6eb6370757b9e94c4645e91d5d.zip |
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>
Diffstat (limited to 'drivers/nvme/host/fabrics.c')
-rw-r--r-- | drivers/nvme/host/fabrics.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c index a4967de5bb25..76b4fe6816a0 100644 --- a/drivers/nvme/host/fabrics.c +++ b/drivers/nvme/host/fabrics.c @@ -882,10 +882,10 @@ nvmf_create_ctrl(struct device *dev, const char *buf, size_t count) goto out_unlock; } - if (strcmp(ctrl->subnqn, opts->subsysnqn)) { + if (strcmp(ctrl->subsys->subnqn, opts->subsysnqn)) { dev_warn(ctrl->device, "controller returned incorrect NQN: \"%s\".\n", - ctrl->subnqn); + ctrl->subsys->subnqn); up_read(&nvmf_transports_rwsem); nvme_delete_ctrl_sync(ctrl); return ERR_PTR(-EINVAL); |