lkml.org 
[lkml]   [2023]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] blk-cgroup: fix missing pd_online_fn() while activating policy
From
Date
Hi, Jens

在 2023/01/03 19:28, Yu Kuai 写道:
> From: Yu Kuai <yukuai3@huawei.com>
>
> If the policy defines pd_online_fn(), it should be called after
> pd_init_fn(), like blkg_create().
>
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>

Can you apply this patch?

Thanks,
Kuai
> ---
> block/blk-cgroup.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
> index ce6a2b7d3dfb..4c94a6560f62 100644
> --- a/block/blk-cgroup.c
> +++ b/block/blk-cgroup.c
> @@ -1455,6 +1455,10 @@ int blkcg_activate_policy(struct request_queue *q,
> list_for_each_entry_reverse(blkg, &q->blkg_list, q_node)
> pol->pd_init_fn(blkg->pd[pol->plid]);
>
> + if (pol->pd_online_fn)
> + list_for_each_entry_reverse(blkg, &q->blkg_list, q_node)
> + pol->pd_online_fn(blkg->pd[pol->plid]);
> +
> __set_bit(pol->plid, q->blkcg_pols);
> ret = 0;
>
>

\
 
 \ /
  Last update: 2023-03-26 23:43    [W:0.044 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site