Skip to content

blk-cgroup: wait for old blkgs to leave queue before disk rebind - #1151

Open
blktests-ci[bot] wants to merge 1 commit into
for-next_basefrom
series/1147589=>for-next
Open

blk-cgroup: wait for old blkgs to leave queue before disk rebind#1151
blktests-ci[bot] wants to merge 1 commit into
for-next_basefrom
series/1147589=>for-next

Conversation

@blktests-ci

@blktests-ci blktests-ci Bot commented Aug 18, 2026

Copy link
Copy Markdown

Pull request for series with
subject: blk-cgroup: wait for old blkgs to leave queue before disk rebind
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1147589

@blktests-ci

blktests-ci Bot commented Aug 18, 2026

Copy link
Copy Markdown
Author

Upstream branch: 8421340
series: https://patchwork.kernel.org/project/linux-block/list/?series=1147589
version: 1

@blktests-ci

blktests-ci Bot commented Aug 19, 2026

Copy link
Copy Markdown
Author

Upstream branch: a33221f
series: https://patchwork.kernel.org/project/linux-block/list/?series=1147589
version: 1

blkcg_init_disk() currently waits for q->root_blkg to become NULL before
initializing blkcg state for a rebound disk. However, blkg_destroy_all()
clears q->root_blkg after calling blkg_destroy() for each blkg. At that
point the initial references have only been killed, and the blkgs remain
on q->blkg_list until the remaining references drain and
blkg_free_workfn() removes them.

A rebound disk can therefore install new blkcg state while old blkgs are
still attached to the request queue. Wait for q->blkg_list to become empty
instead, and wake the waiter when the final blkg is removed. This covers
the complete queue-side blkg lifetime without adding separate state.

Fixes: 3dbaacf ("blk-cgroup: wait for blkcg cleanup before initializing new disk")
Signed-off-by: Yu Kuai <yukuai@fygo.io>
Reviewed-by: Christoph Hellwig <hch@lst.de>
@blktests-ci
blktests-ci Bot force-pushed the series/1147589=>for-next branch from 2992df0 to e153afd Compare August 19, 2026 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants