f2fs: fix to calculate dirty data during has_not_enough_free_secs()
authorChao Yu <chao@kernel.org>
Thu, 24 Jul 2025 08:01:43 +0000 (16:01 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 28 Jul 2025 16:36:42 +0000 (16:36 +0000)
commite194e140ab7de2ce2782e64b9e086a43ca6ff4f2
tree7af736069af7637ac5e390164f94e6b7b2ae6736
parent6840faddb65683b4e7bd8196f177b038a1e19faf
f2fs: fix to calculate dirty data during has_not_enough_free_secs()

In lfs mode, dirty data needs OPU, we'd better calculate lower_p and
upper_p w/ them during has_not_enough_free_secs(), otherwise we may
encounter out-of-space issue due to we missed to reclaim enough
free section w/ foreground gc.

Fixes: 36abef4e796d ("f2fs: introduce mode=lfs mount option")
Cc: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.h