2017-03-08 04:15:13

by Zhou Chengming

[permalink] [raw]
Subject: [PATCH] don't forget to call pd_online_fn when activate policy

From: z00354408 <[email protected]>

Signed-off-by: z00354408 <[email protected]>
---
block/blk-cgroup.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 8ba0af7..0dd9e76 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1254,6 +1254,12 @@ int blkcg_activate_policy(struct request_queue *q,
pd->plid = pol->plid;
if (pol->pd_init_fn)
pol->pd_init_fn(pd);
+
+ if (pol->pd_online_fn) {
+ spin_lock(blkg->blkcg->lock);
+ pol->pd_online_fn(pd);
+ spin_unlock(blkg->blkcg->lock);
+ }
}

__set_bit(pol->plid, q->blkcg_pols);
--
1.8.3.1


2017-03-08 22:09:30

by Jens Axboe

[permalink] [raw]
Subject: Re: [PATCH] don't forget to call pd_online_fn when activate policy

On 03/07/2017 09:09 PM, Zhou Chengming wrote:
> From: z00354408 <[email protected]>

The patch looks correct to me, but please provide a better
changelog for the change. There's nothing here.

--
Jens Axboe