diff options
author | Jan Kara <jack@suse.cz> | 2022-04-01 12:27:48 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-06-14 18:11:45 +0200 |
commit | 28a8060a0bd2c636788d248d722a67a306dd0189 (patch) | |
tree | 0b3b4bcb8a81dcc15b73245da6962962b9d3606a /block/bfq-iosched.h | |
parent | da9f3025d595956410ceaab2bea01980d7775948 (diff) | |
download | linux-stable-28a8060a0bd2c636788d248d722a67a306dd0189.tar.gz linux-stable-28a8060a0bd2c636788d248d722a67a306dd0189.tar.bz2 linux-stable-28a8060a0bd2c636788d248d722a67a306dd0189.zip |
bfq: Track whether bfq_group is still online
commit 09f871868080c33992cd6a9b72a5ca49582578fa upstream.
Track whether bfq_group is still online. We cannot rely on
blkcg_gq->online because that gets cleared only after all policies are
offlined and we need something that gets updated already under
bfqd->lock when we are cleaning up our bfq_group to be able to guarantee
that when we see online bfq_group, it will stay online while we are
holding bfqd->lock lock.
CC: stable@vger.kernel.org
Tested-by: "yukuai (C)" <yukuai3@huawei.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220401102752.8599-7-jack@suse.cz
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block/bfq-iosched.h')
-rw-r--r-- | block/bfq-iosched.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/bfq-iosched.h b/block/bfq-iosched.h index 5402be82b5f1..be1f4c1febf8 100644 --- a/block/bfq-iosched.h +++ b/block/bfq-iosched.h @@ -896,6 +896,8 @@ struct bfq_group { /* reference counter (see comments in bfq_bic_update_cgroup) */ int ref; + /* Is bfq_group still online? */ + bool online; struct bfq_entity entity; struct bfq_sched_data sched_data; |