nvme: Add admin_tagset pointer to nvme_ctrl
authorSagi Grimberg <sagi@grimberg.me>
Mon, 10 Jul 2017 06:22:29 +0000 (09:22 +0300)
committerChristoph Hellwig <hch@lst.de>
Mon, 28 Aug 2017 19:38:24 +0000 (21:38 +0200)
Will be used when we centralize control flows.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fc.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c
drivers/nvme/host/rdma.c
drivers/nvme/target/loop.c

index 1438be64986670765a9b5463dac0e08d612943b3..1912df41269293b282e20a3c2948fe135b71ee58 100644 (file)
@@ -2731,6 +2731,7 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
        ret = blk_mq_alloc_tag_set(&ctrl->admin_tag_set);
        if (ret)
                goto out_free_queues;
+       ctrl->ctrl.admin_tagset = &ctrl->admin_tag_set;
 
        ctrl->ctrl.admin_q = blk_mq_init_queue(&ctrl->admin_tag_set);
        if (IS_ERR(ctrl->ctrl.admin_q)) {
index b40b9af4564f796bede6d2949fb261a0c240ff43..2c8a02be46fd9a668b5aea0d06cc6a73943a6d7c 100644 (file)
@@ -125,6 +125,7 @@ struct nvme_ctrl {
        struct kref kref;
        int instance;
        struct blk_mq_tag_set *tagset;
+       struct blk_mq_tag_set *admin_tagset;
        struct list_head namespaces;
        struct mutex namespaces_mutex;
        struct device *device;  /* char device */
index 925467b31a333940dc62d62c4c5f3376316e4120..e6283745ecd233794731044787ec8207e4326c54 100644 (file)
@@ -1376,6 +1376,7 @@ static int nvme_alloc_admin_tags(struct nvme_dev *dev)
 
                if (blk_mq_alloc_tag_set(&dev->admin_tagset))
                        return -ENOMEM;
+               dev->ctrl.admin_tagset = &dev->admin_tagset;
 
                dev->ctrl.admin_q = blk_mq_init_queue(&dev->admin_tagset);
                if (IS_ERR(dev->ctrl.admin_q)) {
index 3cecb087ee3a2cde0bfcc13029a1e1a2bf7c545b..6ef56500fc9c9d0d413f4dd52c7505627d7b911f 100644 (file)
@@ -691,6 +691,7 @@ static int nvme_rdma_configure_admin_queue(struct nvme_rdma_ctrl *ctrl)
        error = blk_mq_alloc_tag_set(&ctrl->admin_tag_set);
        if (error)
                goto out_put_dev;
+       ctrl->ctrl.admin_tagset = &ctrl->admin_tag_set;
 
        ctrl->ctrl.admin_q = blk_mq_init_queue(&ctrl->admin_tag_set);
        if (IS_ERR(ctrl->ctrl.admin_q)) {
index 717ed7ddb2f6d59fdd79d5e21565184f3acdf5ec..92628c4329262cdb210b97cc622990507f9ae0e4 100644 (file)
@@ -375,6 +375,7 @@ static int nvme_loop_configure_admin_queue(struct nvme_loop_ctrl *ctrl)
        error = blk_mq_alloc_tag_set(&ctrl->admin_tag_set);
        if (error)
                goto out_free_sq;
+       ctrl->ctrl.admin_tagset = &ctrl->admin_tag_set;
 
        ctrl->ctrl.admin_q = blk_mq_init_queue(&ctrl->admin_tag_set);
        if (IS_ERR(ctrl->ctrl.admin_q)) {