Skip to contentSkip to conversation

f2fs: fix to check upper boundary for value of gc_boost_zoned_gc_percent

PATCH Applied yohan.joung 3 participants 3 messages Jun 25, 2025 – Jul 9, 2025 F2FS file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs: fix to check upper boundary for value of gc_boost_zoned_gc_percent

to check the upper boundary when setting gc_boost_zoned_gc_percent

---
 fs/f2fs/sysfs.c | 7 +++++++
 1 file changed, 7 insertions(+)
fs/f2fs/sysfs.c +7 -0
index 51be7ffb38c5..2b5c35ce7b8c 100644
@@ -628,6 +628,13 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
 		return count;
 	}
 
+	if (!strcmp(a->attr.name, "gc_boost_zoned_gc_percent")) {
+		if (t > 100)
+			return -EINVAL;
+		*ui = (unsigned int)t;
+		return count;
+	}
+
 #ifdef CONFIG_F2FS_IOSTAT
 	if (!strcmp(a->attr.name, "iostat_enable")) {
 		sbi->iostat_enable = !!t;
Signature · 1 line
2.33.0
#2 lore raw
In reply to yohan.joung
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 6 lines · On Wed, 25 Jun 2025 09:14:07 +0900 you wrote:

to check the upper boundary when setting gc_boost_zoned_gc_percent

---
 fs/f2fs/sysfs.c | 7 +++++++
 1 file changed, 7 insertions(+)

Here is the summary with links:
- [f2fs-dev] f2fs: fix to check upper boundary for value of gc_boost_zoned_gc_percent

    https://git.kernel.org/jaegeuk/f2fs/c/10dcaa56ef93

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html