FROMGIT: f2fs: sysfs: export linear_lookup in features directory
cat /sys/fs/f2fs/features/linear_lookup
supported
Bug: 410768629
(cherry picked from commit 617e0491abe4d8d45c5110ca474c0feb428e6828
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev)
Link: https://lore.kernel.org/linux-f2fs-devel/20250416054805.1416834-2-chao@kernel.org
Change-Id: I9762dc9d918f96e716a2e0b76a9fe6d168a6b56a
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
[Chao: Resolved conflicts in fs/f2fs/sysfs.c ]
Signed-off-by: Lee Jones <joneslee@google.com>
diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs
index c4aadf3..90f4dd4 100644
--- a/Documentation/ABI/testing/sysfs-fs-f2fs
+++ b/Documentation/ABI/testing/sysfs-fs-f2fs
@@ -220,7 +220,7 @@
inode_checksum, flexible_inline_xattr, quota_ino,
inode_crtime, lost_found, verity, sb_checksum,
casefold, readonly, compression, test_dummy_encryption_v2,
- atomic_write, pin_file, encrypted_casefold.
+ atomic_write, pin_file, encrypted_casefold, linear_lookup.
What: /sys/fs/f2fs/<disk>/inject_rate
Date: May 2016
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 95638a8..740d0a4 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -746,6 +746,9 @@ F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, compr_saved_block, compr_saved_block);
F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, compr_new_inode, compr_new_inode);
#endif
F2FS_FEATURE_RO_ATTR(pin_file);
+#ifdef CONFIG_UNICODE
+F2FS_FEATURE_RO_ATTR(linear_lookup);
+#endif
/* For ATGC */
F2FS_RW_ATTR(ATGC_INFO, atgc_management, atgc_candidate_ratio, candidate_ratio);
@@ -861,6 +864,9 @@ static struct attribute *f2fs_feat_attrs[] = {
ATTR_LIST(compression),
#endif
ATTR_LIST(pin_file),
+#ifdef CONFIG_UNICODE
+ ATTR_LIST(linear_lookup),
+#endif
NULL,
};
ATTRIBUTE_GROUPS(f2fs_feat);