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