f2fs: fix CURSEG_HOT_DATA left space check
PATCH v3 1/1 f2fs: fix CURSEG_HOT_DATA left space check
This fix combines the space check for data_blocks and dent_blocks when verifying HOT_DATA segment capacity, preventing potential insufficient space issues during checkpoint.
--- fs/f2fs/segment.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/segment.h +1 -1
@@ -649,7 +649,7 @@ static inline bool has_curseg_enough_space(struct f2fs_sb_info *sbi,get_ckpt_valid_blocks (sbi, segno, true); } -if (dent_blocks > left_blocks) +if (dent_blocks + data_blocks > left_blocks)return false;return true; }
Signature · 1 line
2.48.1
Quoted 6 lines · mason.zhang
This fix combines the space check for
data_blocksanddent_blockswhen verifyingHOT_DATAsegment capacity, preventing potential insufficient space issues during checkpoint.Fixes bf34c93d2645 ("f2fs: check curseg space before foreground GC")Signed-off-by mason.zhang <[email protected]>
Thanks,
This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <[email protected]>:
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <[email protected]>:
Quoted 8 lines · On Wed, 6 Aug 2025 20:32:36 +0800 you wrote:
This fix combines the space check for
data_blocksanddent_blockswhen verifyingHOT_DATAsegment capacity, preventing potential insufficient space issues during checkpoint.Fixes bf34c93d2645 ("f2fs: check curseg space before foreground GC")Signed-off-by mason.zhang <[email protected]>[...]
Here is the summary with links:
- [f2fs-dev,v3] f2fs: fix CURSEG_HOT_DATA left space check
https://git.kernel.org/jaegeuk/f2fs/c/066694aac462
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Chao Yu
maintainerQuoted 6 lines · mason.zhang
This fix combines the space check for
data_blocksanddent_blockswhen verifyingHOT_DATAsegment capacity, preventing potential insufficient space issues during checkpoint.Fixes bf34c93d2645 ("f2fs: check curseg space before foreground GC")Signed-off-by mason.zhang <[email protected]>
It breaks f2fs/005 of xfstests, can you please take a look?
Thanks,
Quoted 17 lines
--- fs/f2fs/segment.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/f2fs/segment.h +1
-1@@ -649,7 +649,7 @@ static inline bool has_curseg_enough_space(struct f2fs_sb_info *sbi,get_ckpt_valid_blocks (sbi, segno, true); } -if (dent_blocks > left_blocks) +if (dent_blocks + data_blocks > left_blocks)return false;return true; }
Jaegeuk Kim
maintainerQuoted 9 lines · Chao Yu
Quoted 6 lines · mason.zhang
This fix combines the space check for
data_blocksanddent_blockswhen verifyingHOT_DATAsegment capacity, preventing potential insufficient space issues during checkpoint.Fixes bf34c93d2645 ("f2fs: check curseg space before foreground GC")Signed-off-by mason.zhang <[email protected]>It breaks f2fs/005 of xfstests, can you please take a look?
Ah, this was why I got failure. I'll drop this first.
Quoted 21 lines
Thanks,
Quoted 17 lines
--- fs/f2fs/segment.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/f2fs/segment.h +1
-1@@ -649,7 +649,7 @@ static inline bool has_curseg_enough_space(struct f2fs_sb_info *sbi,get_ckpt_valid_blocks (sbi, segno, true); } -if (dent_blocks > left_blocks) +if (dent_blocks + data_blocks > left_blocks)return false;return true; }