hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8ND38
---------------------------
Since iocost can only be used in cgroup v2, add it to v1 now.
Signed-off-by: Li Nan linan122@huawei.com --- block/blk-iocost.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
diff --git a/block/blk-iocost.c b/block/blk-iocost.c index 089fcb9cfce3..d0bdb286632f 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -3490,6 +3490,28 @@ static ssize_t ioc_cost_model_write(struct kernfs_open_file *of, char *input, return ret; }
+static struct cftype ioc_legacy_files[] = { + { + .name = "cost.weight", + .flags = CFTYPE_NOT_ON_ROOT, + .seq_show = ioc_weight_show, + .write = ioc_weight_write, + }, + { + .name = "cost.qos", + .flags = CFTYPE_ONLY_ON_ROOT, + .seq_show = ioc_qos_show, + .write = ioc_qos_write, + }, + { + .name = "cost.model", + .flags = CFTYPE_ONLY_ON_ROOT, + .seq_show = ioc_cost_model_show, + .write = ioc_cost_model_write, + }, + {} +}; + static struct cftype ioc_files[] = { { .name = "weight", @@ -3514,6 +3536,7 @@ static struct cftype ioc_files[] = {
static struct blkcg_policy blkcg_policy_iocost = { .dfl_cftypes = ioc_files, + .legacy_cftypes = ioc_legacy_files, .cpd_alloc_fn = ioc_cpd_alloc, .cpd_free_fn = ioc_cpd_free, .pd_alloc_fn = ioc_pd_alloc,
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/3341 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/M...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/3341 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/M...