blk-cgroup: wait for old blkgs to leave queue before disk rebind - #1151
Open
blktests-ci[bot] wants to merge 1 commit into
Open
blk-cgroup: wait for old blkgs to leave queue before disk rebind#1151blktests-ci[bot] wants to merge 1 commit into
blktests-ci[bot] wants to merge 1 commit into
Conversation
Author
|
Upstream branch: 8421340 |
blktests-ci
Bot
force-pushed
the
for-next_base
branch
from
August 19, 2026 05:25
b634aa6 to
aba1ae2
Compare
Author
|
Upstream branch: a33221f |
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
Bot
force-pushed
the
series/1147589=>for-next
branch
from
August 19, 2026 05:40
2992df0 to
e153afd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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