Skip to contentSkip to conversation

f2fs-tools: enable write hint by default

PATCH In review Jaegeuk Kim via Linux-f2fs-devel 1 participant 3 messages Apr 21, 2025 – Apr 24, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs-tools: enable write hint by default

If the device support write hints, let's assign it in Android devices.

---
 fsck/main.c             | 4 ++++
 mkfs/f2fs_format_main.c | 4 ++++
 2 files changed, 8 insertions(+)
fsck/main.c +4 -0
index 423a9a63782c..cb51673aeda8 100644
@@ -233,6 +233,10 @@ static void add_default_options(void)
 
 		/* disable nat_bits feature by default */
 		c.disabled_feature |= F2FS_FEATURE_NAT_BITS;
+
+		/* enable write hitn by default */
+		c.need_whint = true;
+		c.whint = WRITE_LIFE_NOT_SET;
 	}
 	c.quota_fix = 1;
 }
mkfs/f2fs_format_main.c +4 -0
index 5b4569d9e3ab..3a8fde021373 100644
@@ -156,6 +156,10 @@ static void add_default_options(void)
 		c.feature |= F2FS_FEATURE_PRJQUOTA;
 		c.feature |= F2FS_FEATURE_EXTRA_ATTR;
 		c.feature |= F2FS_FEATURE_VERITY;
+
+		/* enable write hitn by default */
+		c.need_whint = true;
+		c.whint = WRITE_LIFE_NOT_SET;
 		break;
 	}
 #ifdef CONF_CASEFOLD
Signature · 8 lines
2.49.0.805.g082f7c87e0-goog



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
author Reviewed-by Chao Yu on v1 1/1
#2 lore raw
In reply to Jaegeuk Kim via Linux-f2fs-devel
Quoted 3 lines · On 4/22/25 00:15, Jaegeuk Kim via Linux-f2fs-devel wrote:

If the device support write hints, let's assign it in Android devices.

Thanks,

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel