xref: /openbmc/linux/fs/f2fs/Kconfig (revision 925c86a1)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
2a14d5393SJaegeuk Kimconfig F2FS_FS
3d7196c5aSJaegeuk Kim	tristate "F2FS filesystem support"
4573ea5fcSJaegeuk Kim	depends on BLOCK
5*925c86a1SChristoph Hellwig	select BUFFER_HEAD
6aabc172bSYueHaibing	select NLS
743b6573bSKeith Mok	select CRYPTO
843b6573bSKeith Mok	select CRYPTO_CRC32
9643fa961SChandan Rajendra	select F2FS_FS_XATTR if FS_ENCRYPTION
10ede7a09fSHerbert Xu	select FS_ENCRYPTION_ALGS if FS_ENCRYPTION
111517c1a7SEric Biggers	select FS_IOMAP
1272f85881SGeert Uytterhoeven	select LZ4_COMPRESS if F2FS_FS_LZ4
1372f85881SGeert Uytterhoeven	select LZ4_DECOMPRESS if F2FS_FS_LZ4
1472f85881SGeert Uytterhoeven	select LZ4HC_COMPRESS if F2FS_FS_LZ4HC
1572f85881SGeert Uytterhoeven	select LZO_COMPRESS if F2FS_FS_LZO
1672f85881SGeert Uytterhoeven	select LZO_DECOMPRESS if F2FS_FS_LZO
1772f85881SGeert Uytterhoeven	select ZSTD_COMPRESS if F2FS_FS_ZSTD
1872f85881SGeert Uytterhoeven	select ZSTD_DECOMPRESS if F2FS_FS_ZSTD
19a14d5393SJaegeuk Kim	help
20a14d5393SJaegeuk Kim	  F2FS is based on Log-structured File System (LFS), which supports
21a14d5393SJaegeuk Kim	  versatile "flash-friendly" features. The design has been focused on
22a14d5393SJaegeuk Kim	  addressing the fundamental issues in LFS, which are snowball effect
23a14d5393SJaegeuk Kim	  of wandering tree and high cleaning overhead.
24a14d5393SJaegeuk Kim
25a14d5393SJaegeuk Kim	  Since flash-based storages show different characteristics according to
26a14d5393SJaegeuk Kim	  the internal geometry or flash memory management schemes aka FTL, F2FS
27a14d5393SJaegeuk Kim	  and tools support various parameters not only for configuring on-disk
28a14d5393SJaegeuk Kim	  layout, but also for selecting allocation and cleaning algorithms.
29a14d5393SJaegeuk Kim
30a14d5393SJaegeuk Kim	  If unsure, say N.
31a14d5393SJaegeuk Kim
32a14d5393SJaegeuk Kimconfig F2FS_STAT_FS
33a14d5393SJaegeuk Kim	bool "F2FS Status Information"
34fc7100eaSHridya Valsaraju	depends on F2FS_FS
35a14d5393SJaegeuk Kim	default y
36a14d5393SJaegeuk Kim	help
37a14d5393SJaegeuk Kim	  /sys/kernel/debug/f2fs/ contains information about all the partitions
38a14d5393SJaegeuk Kim	  mounted as f2fs. Each file shows the whole f2fs information.
39a14d5393SJaegeuk Kim
40a14d5393SJaegeuk Kim	  /sys/kernel/debug/f2fs/status includes:
41a14d5393SJaegeuk Kim	    - major filesystem information managed by f2fs currently
42a14d5393SJaegeuk Kim	    - average SIT information about whole segments
43a14d5393SJaegeuk Kim	    - current memory footprint consumed by f2fs.
44a14d5393SJaegeuk Kim
45a14d5393SJaegeuk Kimconfig F2FS_FS_XATTR
46a14d5393SJaegeuk Kim	bool "F2FS extended attributes"
47a14d5393SJaegeuk Kim	depends on F2FS_FS
48a14d5393SJaegeuk Kim	default y
49a14d5393SJaegeuk Kim	help
50a14d5393SJaegeuk Kim	  Extended attributes are name:value pairs associated with inodes by
5191581e4cSAdam Borowski	  the kernel or by users (see the attr(5) manual page for details).
52a14d5393SJaegeuk Kim
53a14d5393SJaegeuk Kim	  If unsure, say N.
54a14d5393SJaegeuk Kim
55a14d5393SJaegeuk Kimconfig F2FS_FS_POSIX_ACL
56a14d5393SJaegeuk Kim	bool "F2FS Access Control Lists"
57a14d5393SJaegeuk Kim	depends on F2FS_FS_XATTR
58a14d5393SJaegeuk Kim	select FS_POSIX_ACL
59a14d5393SJaegeuk Kim	default y
60a14d5393SJaegeuk Kim	help
61a14d5393SJaegeuk Kim	  Posix Access Control Lists (ACLs) support permissions for users and
62217940d4SJunesung Lee	  groups beyond the owner/group/world scheme.
63a14d5393SJaegeuk Kim
64a14d5393SJaegeuk Kim	  If you don't know what Access Control Lists are, say N
658ae8f162SJaegeuk Kim
668ae8f162SJaegeuk Kimconfig F2FS_FS_SECURITY
678ae8f162SJaegeuk Kim	bool "F2FS Security Labels"
688ae8f162SJaegeuk Kim	depends on F2FS_FS_XATTR
698ae8f162SJaegeuk Kim	help
708ae8f162SJaegeuk Kim	  Security labels provide an access control facility to support Linux
718ae8f162SJaegeuk Kim	  Security Models (LSMs) accepted by AppArmor, SELinux, Smack and TOMOYO
728ae8f162SJaegeuk Kim	  Linux. This option enables an extended attribute handler for file
738ae8f162SJaegeuk Kim	  security labels in the f2fs filesystem, so that it requires enabling
74bd7253bcSLockywolf	  the extended attribute support in advance. In particular you need this
75bd7253bcSLockywolf	  option if you use the setcap command to assign initial process capabi-
76bd7253bcSLockywolf	  lities to executables (the security.* extended attributes).
778ae8f162SJaegeuk Kim
788ae8f162SJaegeuk Kim	  If you are not using a security module, say N.
793b218e3aSJaegeuk Kim
803b218e3aSJaegeuk Kimconfig F2FS_CHECK_FS
813b218e3aSJaegeuk Kim	bool "F2FS consistency checking feature"
823b218e3aSJaegeuk Kim	depends on F2FS_FS
833b218e3aSJaegeuk Kim	help
843b218e3aSJaegeuk Kim	  Enables BUG_ONs which check the filesystem consistency in runtime.
853b218e3aSJaegeuk Kim
863b218e3aSJaegeuk Kim	  If you want to improve the performance, say N.
8763f92ddcSJaegeuk Kim
8873faec4dSJaegeuk Kimconfig F2FS_FAULT_INJECTION
8973faec4dSJaegeuk Kim	bool "F2FS fault injection facility"
9073faec4dSJaegeuk Kim	depends on F2FS_FS
9173faec4dSJaegeuk Kim	help
9273faec4dSJaegeuk Kim	  Test F2FS to inject faults such as ENOMEM, ENOSPC, and so on.
9373faec4dSJaegeuk Kim
9473faec4dSJaegeuk Kim	  If unsure, say N.
954c8ff709SChao Yu
964c8ff709SChao Yuconfig F2FS_FS_COMPRESSION
974c8ff709SChao Yu	bool "F2FS compression feature"
984c8ff709SChao Yu	depends on F2FS_FS
994c8ff709SChao Yu	help
1004c8ff709SChao Yu	  Enable filesystem-level compression on f2fs regular files,
1014c8ff709SChao Yu	  multiple back-end compression algorithms are supported.
1024c8ff709SChao Yu
1034c8ff709SChao Yuconfig F2FS_FS_LZO
1044c8ff709SChao Yu	bool "LZO compression support"
1054c8ff709SChao Yu	depends on F2FS_FS_COMPRESSION
1064c8ff709SChao Yu	default y
1074c8ff709SChao Yu	help
1084c8ff709SChao Yu	  Support LZO compress algorithm, if unsure, say Y.
1094c8ff709SChao Yu
1106b3ba1e7STiezhu Yangconfig F2FS_FS_LZORLE
1116b3ba1e7STiezhu Yang	bool "LZO-RLE compression support"
1126b3ba1e7STiezhu Yang	depends on F2FS_FS_LZO
1136b3ba1e7STiezhu Yang	default y
1146b3ba1e7STiezhu Yang	help
1156b3ba1e7STiezhu Yang	  Support LZO-RLE compress algorithm, if unsure, say Y.
1166b3ba1e7STiezhu Yang
1174c8ff709SChao Yuconfig F2FS_FS_LZ4
1184c8ff709SChao Yu	bool "LZ4 compression support"
1194c8ff709SChao Yu	depends on F2FS_FS_COMPRESSION
1204c8ff709SChao Yu	default y
1214c8ff709SChao Yu	help
1224c8ff709SChao Yu	  Support LZ4 compress algorithm, if unsure, say Y.
12350cfa66fSChao Yu
1243fde13f8SChao Yuconfig F2FS_FS_LZ4HC
1253fde13f8SChao Yu	bool "LZ4HC compression support"
1263fde13f8SChao Yu	depends on F2FS_FS_LZ4
1273fde13f8SChao Yu	default y
1283fde13f8SChao Yu	help
1293fde13f8SChao Yu	  Support LZ4HC compress algorithm, LZ4HC has compatible on-disk
1303fde13f8SChao Yu	  layout with LZ4, if unsure, say Y.
1313fde13f8SChao Yu
13250cfa66fSChao Yuconfig F2FS_FS_ZSTD
13350cfa66fSChao Yu	bool "ZSTD compression support"
13450cfa66fSChao Yu	depends on F2FS_FS_COMPRESSION
13550cfa66fSChao Yu	default y
13650cfa66fSChao Yu	help
13750cfa66fSChao Yu	  Support ZSTD compress algorithm, if unsure, say Y.
13852118743SDaeho Jeong
13952118743SDaeho Jeongconfig F2FS_IOSTAT
14052118743SDaeho Jeong	bool "F2FS IO statistics information"
14152118743SDaeho Jeong	depends on F2FS_FS
14252118743SDaeho Jeong	default y
14352118743SDaeho Jeong	help
14452118743SDaeho Jeong	  Support getting IO statistics through sysfs and printing out periodic
14552118743SDaeho Jeong	  IO statistics tracepoint events. You have to turn on "iostat_enable"
14652118743SDaeho Jeong	  sysfs node to enable this feature.
1477f8e249dSJaegeuk Kim
1487f8e249dSJaegeuk Kimconfig F2FS_UNFAIR_RWSEM
1497f8e249dSJaegeuk Kim	bool "F2FS unfair rw_semaphore"
1507f8e249dSJaegeuk Kim	depends on F2FS_FS && BLK_CGROUP
1517f8e249dSJaegeuk Kim	help
1527f8e249dSJaegeuk Kim	  Use unfair rw_semaphore, if system configured IO priority by block
1537f8e249dSJaegeuk Kim	  cgroup.
154