summaryrefslogtreecommitdiff
path: root/fs/f2fs/dir.c
diff options
context:
space:
mode:
authorSahitya Tummala <stummala@codeaurora.org>2019-08-07 16:40:32 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2019-08-23 17:57:15 +0300
commitbbf9f7d90f21e05e31b7cdd95b32f64dd2819dfe (patch)
treea46622dd284119f5c32e66ec38c7bf496dff193f /fs/f2fs/dir.c
parent2fde3dd14efe8ceb21a92c2749394a5df61cb7df (diff)
downloadlinux-bbf9f7d90f21e05e31b7cdd95b32f64dd2819dfe.tar.xz
f2fs: Fix indefinite loop in f2fs_gc()
Policy - Foreground GC, LFS and greedy GC mode. Under this policy, f2fs_gc() loops forever to GC as it doesn't have enough free segements to proceed and thus it keeps calling gc_more for the same victim segment. This can happen if the selected victim segment could not be GC'd due to failed blkaddr validity check i.e. is_alive() returns false for the blocks set in current validity map. Fix this by keeping track of such invalid segments and skip those segments for selection in get_victim_by_default() to avoid endless GC loop under such error scenarios. Currently, add this logic under CONFIG_F2FS_CHECK_FS to be able to root cause the issue in debug version. Signed-off-by: Sahitya Tummala <stummala@codeaurora.org> Reviewed-by: Chao Yu <yuchao0@huawei.com> [Jaegeuk Kim: fix wrong bitmap size] Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/dir.c')
0 files changed, 0 insertions, 0 deletions