summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaeho Jeong <daehojeong@google.com>2026-05-14 23:55:13 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2026-06-22 22:52:34 +0300
commit5dfb768326b95c6dd6554f34dec71b44a01a0bc8 (patch)
tree58d936821ea21f375d0d8bb2ec0dd8455d0de5b7 /scripts
parentf6b24566035835dc22796f24b1e8738581840b17 (diff)
downloadlinux-5dfb768326b95c6dd6554f34dec71b44a01a0bc8.tar.xz
f2fs: optimize representative type determination in GC
In large section mode, do_garbage_collect() previously determined the section's representative type by looking only at the first segment of the section. However, if data was fsynced into an area previously used as a node section, and this area is recovered during roll-forward recovery after sudden power off (SPO), GC would incorrectly assume the section's type based on an empty or obsolete first segment. This caused the recovered data segment to be misunderstood as being stuck inside a node section, triggering false inconsistency panics (Inconsistent segment type in SSA and SIT) and subsequent mount failures. This patch optimizes do_garbage_collect() to determine the section's representative type by identifying the first segment that actually contains valid blocks (valid_blocks > 0) during the main GC loop. This eliminates false alarms from empty/obsolete leading segments while maintaining strict section-level type consistency checks for genuine corruption. Signed-off-by: Daeho Jeong <daehojeong@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions