Commit e9f2f3f5 authored by Chengming Zhou's avatar Chengming Zhou Committed by Jens Axboe

block, bfq: remove BFQ_WEIGHT_LEGACY_DFL

BFQ_WEIGHT_LEGACY_DFL is the same as CGROUP_WEIGHT_DFL, which means
we don't need cpd_bind_fn() callback to update default weight when
attached to a hierarchy.

This patch remove BFQ_WEIGHT_LEGACY_DFL and cpd_bind_fn().
Signed-off-by: default avatarChengming Zhou <zhouchengming@bytedance.com>
Acked-by: default avatarTejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20230406145050.49914-2-zhouchengming@bytedance.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 4c4dd04e
...@@ -504,8 +504,7 @@ static void bfq_cpd_init(struct blkcg_policy_data *cpd) ...@@ -504,8 +504,7 @@ static void bfq_cpd_init(struct blkcg_policy_data *cpd)
{ {
struct bfq_group_data *d = cpd_to_bfqgd(cpd); struct bfq_group_data *d = cpd_to_bfqgd(cpd);
d->weight = cgroup_subsys_on_dfl(io_cgrp_subsys) ? d->weight = CGROUP_WEIGHT_DFL;
CGROUP_WEIGHT_DFL : BFQ_WEIGHT_LEGACY_DFL;
} }
static void bfq_cpd_free(struct blkcg_policy_data *cpd) static void bfq_cpd_free(struct blkcg_policy_data *cpd)
...@@ -1302,7 +1301,6 @@ struct blkcg_policy blkcg_policy_bfq = { ...@@ -1302,7 +1301,6 @@ struct blkcg_policy blkcg_policy_bfq = {
.cpd_alloc_fn = bfq_cpd_alloc, .cpd_alloc_fn = bfq_cpd_alloc,
.cpd_init_fn = bfq_cpd_init, .cpd_init_fn = bfq_cpd_init,
.cpd_bind_fn = bfq_cpd_init,
.cpd_free_fn = bfq_cpd_free, .cpd_free_fn = bfq_cpd_free,
.pd_alloc_fn = bfq_pd_alloc, .pd_alloc_fn = bfq_pd_alloc,
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#define BFQ_DEFAULT_QUEUE_IOPRIO 4 #define BFQ_DEFAULT_QUEUE_IOPRIO 4
#define BFQ_WEIGHT_LEGACY_DFL 100
#define BFQ_DEFAULT_GRP_IOPRIO 0 #define BFQ_DEFAULT_GRP_IOPRIO 0
#define BFQ_DEFAULT_GRP_CLASS IOPRIO_CLASS_BE #define BFQ_DEFAULT_GRP_CLASS IOPRIO_CLASS_BE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment