* [PATCH] f2fs: fix CURSEG_HOT_DATA left space check
@ 2025-08-04 16:54 mason.zhang
0 siblings, 0 replies; only message in thread
From: mason.zhang @ 2025-08-04 16:54 UTC (permalink / raw)
To: chao; +Cc: linux-f2fs-devel, linux-kernel, masonzhang.linuxer
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.
Signed-off-by: mason.zhang <masonzhang.linuxer@gmail.com>
---
fs/f2fs/segment.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index db619fd2f51a..d8dae0049b6a 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -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;
}
--
2.48.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-08-04 16:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-04 16:54 [PATCH] f2fs: fix CURSEG_HOT_DATA left space check mason.zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).