Skip to contentSkip to conversation

remove nvme_reinit_tagset and blk_mq_tagset_iter

PATCH New Christoph Hellwig 2 participants 6 messages Jun 14, 2018

Subsystems (2)
lore
Share & tools
lore

Christoph Hellwig

author maintainer
#0 lore raw

Now that nvme-fc moved off the reinit request concept both the core nvme and blk-mq code for it becomes unused.

Jens, are you ok with queuing up the blk-mq side with the pending nvme changes?

author maintainer
#1 lore raw

PATCH 1/2 nvme: remove nvme_reinit_tagset

Unused now that all transports stopped using it.

---
 drivers/nvme/host/core.c | 10 ----------
 drivers/nvme/host/nvme.h |  2 --
 2 files changed, 12 deletions(-)
drivers/nvme/host/core.c +0 -10
index dee8e71baf62..020a00f932a0 100644
@@ -3627,16 +3627,6 @@ void nvme_start_queues(struct nvme_ctrl *ctrl)
 }
 EXPORT_SYMBOL_GPL(nvme_start_queues);
 
-int nvme_reinit_tagset(struct nvme_ctrl *ctrl, struct blk_mq_tag_set *set)
-{
-	if (!ctrl->ops->reinit_request)
-		return 0;
-
-	return blk_mq_tagset_iter(set, set->driver_data,
-			ctrl->ops->reinit_request);
-}
-EXPORT_SYMBOL_GPL(nvme_reinit_tagset);
-
 int __init nvme_core_init(void)
 {
 	int result = -ENOMEM;
drivers/nvme/host/nvme.h +0 -2
index 34df07d44f80..231807cbc849 100644
@@ -321,7 +321,6 @@ struct nvme_ctrl_ops {
 	void (*submit_async_event)(struct nvme_ctrl *ctrl);
 	void (*delete_ctrl)(struct nvme_ctrl *ctrl);
 	int (*get_address)(struct nvme_ctrl *ctrl, char *buf, int size);
-	int (*reinit_request)(void *data, struct request *rq);
 	void (*stop_ctrl)(struct nvme_ctrl *ctrl);
 };
 
@@ -416,7 +415,6 @@ void nvme_unfreeze(struct nvme_ctrl *ctrl);
 void nvme_wait_freeze(struct nvme_ctrl *ctrl);
 void nvme_wait_freeze_timeout(struct nvme_ctrl *ctrl, long timeout);
 void nvme_start_freeze(struct nvme_ctrl *ctrl);
-int nvme_reinit_tagset(struct nvme_ctrl *ctrl, struct blk_mq_tag_set *set);
 
 #define NVME_QID_ANY -1
 struct request *nvme_alloc_request(struct request_queue *q,
Signature · 1 line
2.17.1
author maintainer
#2 lore raw

PATCH 2/2 blk-mq: remove blk_mq_tagset_iter

In reply to Christoph Hellwig

Unused now that nvme stopped using it.

---
 block/blk-mq-tag.c     | 29 -----------------------------
 include/linux/blk-mq.h |  2 --
 2 files changed, 31 deletions(-)
block/blk-mq-tag.c +0 -29
index 70356a2a11ab..09b2ee6694fb 100644
@@ -311,35 +311,6 @@ void blk_mq_tagset_busy_iter(struct blk_mq_tag_set *tagset,
 }
 EXPORT_SYMBOL(blk_mq_tagset_busy_iter);
 
-int blk_mq_tagset_iter(struct blk_mq_tag_set *set, void *data,
-			 int (fn)(void *, struct request *))
-{
-	int i, j, ret = 0;
-
-	if (WARN_ON_ONCE(!fn))
-		goto out;
-
-	for (i = 0; i < set->nr_hw_queues; i++) {
-		struct blk_mq_tags *tags = set->tags[i];
-
-		if (!tags)
-			continue;
-
-		for (j = 0; j < tags->nr_tags; j++) {
-			if (!tags->static_rqs[j])
-				continue;
-
-			ret = fn(data, tags->static_rqs[j]);
-			if (ret)
-				goto out;
-		}
-	}
-
-out:
-	return ret;
-}
-EXPORT_SYMBOL_GPL(blk_mq_tagset_iter);
-
 void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_iter_fn *fn,
 		void *priv)
 {
include/linux/blk-mq.h +0 -2
index fb355173f3c7..e3147eb74222 100644
@@ -281,8 +281,6 @@ void blk_freeze_queue_start(struct request_queue *q);
 void blk_mq_freeze_queue_wait(struct request_queue *q);
 int blk_mq_freeze_queue_wait_timeout(struct request_queue *q,
 				     unsigned long timeout);
-int blk_mq_tagset_iter(struct blk_mq_tag_set *set, void *data,
-		int (reinit_request)(void *, struct request *));
 
 int blk_mq_map_queues(struct blk_mq_tag_set *set);
 void blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set, int nr_hw_queues);
Signature · 1 line
2.17.1
maintainer
#3 lore raw
In reply to Christoph Hellwig
Quoted 5 lines · Christoph Hellwig

Now that nvme-fc moved off the reinit request concept both the core nvme and blk-mq code for it becomes unused.

Jens, are you ok with queuing up the blk-mq side with the pending nvme changes?

Are you asking if you can queue it up, presumable because the nvme-fc change isn't upstream yet? That's fine with me, you can add my reviewed-by to the patches.

Signature · 1 line
Jens Axboe
maintainer
#5 lore raw
In reply to Christoph Hellwig
Quoted 8 lines · Christoph Hellwig
Quoted 7 lines · Jens Axboe
Quoted 5 lines · Christoph Hellwig

Now that nvme-fc moved off the reinit request concept both the core nvme and blk-mq code for it becomes unused.

Jens, are you ok with queuing up the blk-mq side with the pending nvme changes?

Quoted 6 lines
Quoted 3 lines

Are you asking if you can queue it up, presumable because the nvme-fc change isn't upstream yet? That's fine with me, you can add my reviewed-by to the patches.

Yes, that is the plan. The nvme changes are fixes I'm going to send you ASAP, and I think we can just send the dead code removal along.

OK, that sounds fine then. Please do send them asap, so I can ship what I have for Linus before he cuts -rc1 on Sunday.

Signature · 1 line
Jens Axboe
author maintainer
#4 lore raw
In reply to Jens Axboe
Quoted 10 lines · Jens Axboe
Quoted 5 lines · Christoph Hellwig

Now that nvme-fc moved off the reinit request concept both the core nvme and blk-mq code for it becomes unused.

Jens, are you ok with queuing up the blk-mq side with the pending nvme changes?

Are you asking if you can queue it up, presumable because the nvme-fc change isn't upstream yet? That's fine with me, you can add my reviewed-by to the patches.

Yes, that is the plan. The nvme changes are fixes I'm going to send you ASAP, and I think we can just send the dead code removal along.