Commit c1aaaf65 authored by Chao Yu's avatar Chao Yu Committed by Venkatesh G (xWF)
Browse files

FROMGIT: f2fs: sysfs: add encoding_flags entry

This patch adds a new sysfs entry /sys/fs/f2fs/<disk>/encoding_flags,
it is a read-only entry to show the value of sb.s_encoding_flags, the
value is hexadecimal.

============================     ==========
Flag_Name                        Flag_Value
============================     ==========
SB_ENC_STRICT_MODE_FL            0x00000001
SB_ENC_NO_COMPAT_FALLBACK_FL     0x00000002
============================     ==========

case#1
mkfs.f2fs -f -O casefold -C utf8:strict /dev/vda
mount /dev/vda /mnt/f2fs
cat /sys/fs/f2fs/vda/encoding_flags
1

case#2
mkfs.f2fs -f -O casefold -C utf8 /dev/vda
fsck.f2fs --nolinear-lookup=1 /dev/vda
mount /dev/vda /mnt/f2fs
cat /sys/fs/f2fs/vda/encoding_flags
2

Bug: 410768629
Bug: 424766421
(cherry picked from commit 3fea0641
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev)
Link: https://lore.kernel.org/linux-f2fs-devel/20250506074725.12315-1-chao@kernel.org


Signed-off-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
[Chao: Resolved conflicts in sysfs-fs-f2fs ]
(cherry picked from https://android-review.googlesource.com/q/commit:1619abb40c02a9d1e4ec03941057f546aa5589dd)
Merged-In: I8a06c81d74278f148c0619fa905989aa75da8719
Change-Id: I8a06c81d74278f148c0619fa905989aa75da8719
parent 03b1e841
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment