Re: [PATCH -next] block, bfq: cleanup 'bfqg->online'

From: Yu Kuai
Date: Wed Feb 01 2023 - 20:17:02 EST


Hi, Jan!

在 2023/02/01 21:10, Jan Kara 写道:
On Wed 01-02-23 20:06:09, Yu Kuai wrote:
From: Yu Kuai <yukuai3@xxxxxxxxxx>

After commit dfd6200a0954 ("blk-cgroup: support to track if policy is
online"), there is no need to do this again in bfq.

Signed-off-by: Yu Kuai <yukuai3@xxxxxxxxxx>

So I agree this is nice to do but it isn't so simple. BFQ relies on the
fact that 'online' is cleared under bfqd->lock so we cannot associate bio
in bfq_bio_bfqg() with a bfqg that has already its bfq_pd_offline()
function run.

Maybe if you set 'online' to false before calling ->pd_offline() things
would work fine for BFQ.

Yes, you're right. Thanks for the explanation.

Kuai