summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2025-09-10 16:04:44 +0800
committerJens Axboe <axboe@kernel.dk>2025-09-10 05:25:56 -0600
commit9784041145796994f2b21f4c7e628d7c9db762f4 (patch)
treebc8e74c069b6a17a4015010ea124f90f94075c23 /block
parentb86433721f46d934940528f28d49c1dedb690df1 (diff)
downloadlinux-9784041145796994f2b21f4c7e628d7c9db762f4.tar.gz
linux-9784041145796994f2b21f4c7e628d7c9db762f4.tar.bz2
linux-9784041145796994f2b21f4c7e628d7c9db762f4.zip
blk-mq: remove blk_mq_tag_update_depth()
This helper is not used now. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/blk-mq-tag.c32
-rw-r--r--block/blk-mq.h2
2 files changed, 0 insertions, 34 deletions
diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
index 936b68273cad..a63d21a4aab4 100644
--- a/block/blk-mq-tag.c
+++ b/block/blk-mq-tag.c
@@ -609,38 +609,6 @@ void blk_mq_free_tags(struct blk_mq_tag_set *set, struct blk_mq_tags *tags)
call_srcu(&set->tags_srcu, &tags->rcu_head, blk_mq_free_tags_callback);
}
-int blk_mq_tag_update_depth(struct blk_mq_hw_ctx *hctx,
- struct blk_mq_tags **tagsptr, unsigned int tdepth)
-{
- struct blk_mq_tags *tags = *tagsptr;
-
- /*
- * If we are allowed to grow beyond the original size, allocate
- * a new set of tags before freeing the old one.
- */
- if (tdepth > tags->nr_tags) {
- struct blk_mq_tag_set *set = hctx->queue->tag_set;
- struct blk_mq_tags *new;
-
- new = blk_mq_alloc_map_and_rqs(set, hctx->queue_num, tdepth);
- if (!new)
- return -ENOMEM;
-
- blk_mq_free_map_and_rqs(set, *tagsptr, hctx->queue_num);
- hctx->queue->elevator->et->tags[hctx->queue_num] = new;
- *tagsptr = new;
- } else {
- /*
- * Don't need (or can't) update reserved tags here, they
- * remain static and should never need resizing.
- */
- sbitmap_queue_resize(&tags->bitmap_tags,
- tdepth - tags->nr_reserved_tags);
- }
-
- return 0;
-}
-
void blk_mq_tag_resize_shared_tags(struct blk_mq_tag_set *set, unsigned int size)
{
struct blk_mq_tags *tags = set->shared_tags;
diff --git a/block/blk-mq.h b/block/blk-mq.h
index 0ef96f510477..af42dc018808 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -184,8 +184,6 @@ unsigned long blk_mq_get_tags(struct blk_mq_alloc_data *data, int nr_tags,
void blk_mq_put_tag(struct blk_mq_tags *tags, struct blk_mq_ctx *ctx,
unsigned int tag);
void blk_mq_put_tags(struct blk_mq_tags *tags, int *tag_array, int nr_tags);
-int blk_mq_tag_update_depth(struct blk_mq_hw_ctx *hctx,
- struct blk_mq_tags **tags, unsigned int depth);
void blk_mq_tag_resize_shared_tags(struct blk_mq_tag_set *set,
unsigned int size);
void blk_mq_tag_update_sched_shared_tags(struct request_queue *q);