fs: preserve superblock inode walk positions across lock drops - #1277
Open
blktests-ci-kpd[bot] wants to merge 7 commits into
Open
fs: preserve superblock inode walk positions across lock drops#1277blktests-ci-kpd[bot] wants to merge 7 commits into
blktests-ci-kpd[bot] wants to merge 7 commits into
Conversation
Author
|
Upstream branch: 893e117 |
blktests-ci-kpd
Bot
force-pushed
the
linus-master_base
branch
from
September 10, 2026 15:29
00cc4ca to
7efd8cd
Compare
Author
|
Upstream branch: 50d05c7 |
blktests-ci-kpd
Bot
force-pushed
the
series/1161167=>linus-master
branch
from
September 10, 2026 15:42
76208c9 to
05e2840
Compare
added 3 commits
September 10, 2026 17:17
Remove trailing whitespace before introducing the inode iterator API. This avoids unrelated whitespace changes from automatic editor cleanup in the following patches. This also fixes formatting issues in fs.h reported by scripts/checkpatch.pl. Signed-off-by: Julian Sun <sunjunchao@bytedance.com> Reviewed-by: Jan Kara <jack@suse.cz>
Add sb_for_each_inodes() to share s_inodes traversal and preserve its position while s_inode_list_lock is dropped. Track active iterators on sb->s_inodes_iters and advance their saved positions before unlinking an inode. Callbacks manage inode references and per-inode work, allowing both normal walks and eviction to use the same interface. Signed-off-by: Julian Sun <sunjunchao@bytedance.com>
Convert sync_bdevs() to sb_for_each_inodes() and move device writeback into a callback. The iterator preserves the walk position, allowing the callback to iput() its inode before reacquiring the list lock and removing the old_inode reference carried across iterations. Signed-off-by: Julian Sun <sunjunchao@bytedance.com>
Author
|
Upstream branch: 50d05c7 |
added 4 commits
September 10, 2026 17:17
Use sb_for_each_inodes() in evict_inodes() to avoid rescanning referenced inodes after each reschedule. Collect eligible inodes during the walk and dispose of them after it completes. Convert drop_pagecache_sb() as well, replacing its deferred toput_inode reference with the iterator's position tracking. Signed-off-by: Julian Sun <sunjunchao@bytedance.com>
Convert gfs2_evict_inodes() to sb_for_each_inodes(). Take and drop the inode reference within the callback, with iput() outside the list lock, to retain cooperative eviction. The iterator preserves the walk position and removes the need for toput_inode. Signed-off-by: Julian Sun <sunjunchao@bytedance.com>
Convert add_dquot_ref() to sb_for_each_inodes(), passing the quota type to the callback and propagating initialization errors. This removes the old_inode reference used to preserve the walk position. Leave remove_dquot_ref() unchanged to avoid adding per-inode locking to a walk that never drops s_inode_list_lock. Signed-off-by: Julian Sun <sunjunchao@bytedance.com>
Convert hook_sb_delete() to sb_for_each_inodes() and release each callback's inode reference outside s_inode_list_lock. This removes the prev_inode reference used to preserve the walk position while retaining the synchronization with release_inode() and the final wait for pending inode releases. Signed-off-by: Julian Sun <sunjunchao@bytedance.com>
blktests-ci-kpd
Bot
force-pushed
the
series/1161167=>linus-master
branch
from
September 10, 2026 17:17
05e2840 to
2314183
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: fs: preserve superblock inode walk positions across lock drops
version: 1
url: https://patchwork.kernel.org/series/1161167/