1# SPDX-License-Identifier: GPL-2.0-only
2#
3# File system configuration
4#
5
6menu "File systems"
7
8# Use unaligned word dcache accesses
9config DCACHE_WORD_ACCESS
10       bool
11
12config VALIDATE_FS_PARSER
13	bool "Validate filesystem parameter description"
14	help
15	  Enable this to perform validation of the parameter description for a
16	  filesystem when it is registered.
17
18config FS_IOMAP
19	bool
20
21config BUFFER_HEAD
22	bool
23
24# old blockdev_direct_IO implementation.  Use iomap for new code instead
25config LEGACY_DIRECT_IO
26	depends on BUFFER_HEAD
27	bool
28
29if BLOCK
30
31source "fs/ext2/Kconfig"
32source "fs/ext4/Kconfig"
33source "fs/hmdfs/Kconfig"
34source "fs/sharefs/Kconfig"
35source "fs/jbd2/Kconfig"
36
37config FS_MBCACHE
38# Meta block cache for Extended Attributes (ext2/ext3/ext4)
39	tristate
40	default y if EXT2_FS=y && EXT2_FS_XATTR
41	default y if EXT4_FS=y
42	default m if EXT2_FS_XATTR || EXT4_FS
43
44source "fs/reiserfs/Kconfig"
45source "fs/jfs/Kconfig"
46
47source "fs/xfs/Kconfig"
48source "fs/gfs2/Kconfig"
49source "fs/ocfs2/Kconfig"
50source "fs/btrfs/Kconfig"
51source "fs/nilfs2/Kconfig"
52source "fs/f2fs/Kconfig"
53source "fs/zonefs/Kconfig"
54source "fs/proc/memory_security/Kconfig"
55
56endif # BLOCK
57
58config FS_DAX
59	bool "File system based Direct Access (DAX) support"
60	depends on MMU
61	depends on !(ARM || MIPS || SPARC)
62	depends on ZONE_DEVICE || FS_DAX_LIMITED
63	select FS_IOMAP
64	select DAX
65	help
66	  Direct Access (DAX) can be used on memory-backed block devices.
67	  If the block device supports DAX and the filesystem supports DAX,
68	  then you can avoid using the pagecache to buffer I/Os.  Turning
69	  on this option will compile in support for DAX.
70
71	  For a DAX device to support file system access it needs to have
72	  struct pages.  For the nfit based NVDIMMs this can be enabled
73	  using the ndctl utility:
74
75		# ndctl create-namespace --force --reconfig=namespace0.0 \
76			--mode=fsdax --map=mem
77
78	  See the 'create-namespace' man page for details on the overhead of
79	  --map=mem:
80	  https://docs.pmem.io/ndctl-user-guide/ndctl-man-pages/ndctl-create-namespace
81
82          For ndctl to work CONFIG_DEV_DAX needs to be enabled as well. For most
83	  file systems DAX support needs to be manually enabled globally or
84	  per-inode using a mount option as well.  See the file documentation in
85	  Documentation/filesystems/dax.rst for details.
86
87	  If you do not have a block device that is capable of using this,
88	  or if unsure, say N.  Saying Y will increase the size of the kernel
89	  by about 5kB.
90
91config FS_DAX_PMD
92	bool
93	default FS_DAX
94	depends on FS_DAX
95	depends on ZONE_DEVICE
96	depends on TRANSPARENT_HUGEPAGE
97
98# Selected by DAX drivers that do not expect filesystem DAX to support
99# get_user_pages() of DAX mappings. I.e. "limited" indicates no support
100# for fork() of processes with MAP_SHARED mappings or support for
101# direct-I/O to a DAX mapping.
102config FS_DAX_LIMITED
103	bool
104
105# Posix ACL utility routines
106#
107# Note: Posix ACLs can be implemented without these helpers.  Never use
108# this symbol for ifdefs in core code.
109#
110config FS_POSIX_ACL
111	def_bool n
112
113config EXPORTFS
114	tristate
115
116config EXPORTFS_BLOCK_OPS
117	bool "Enable filesystem export operations for block IO"
118	help
119	  This option enables the export operations for a filesystem to support
120	  external block IO.
121
122config FILE_LOCKING
123	bool "Enable POSIX file locking API" if EXPERT
124	default y
125	help
126	  This option enables standard file locking support, required
127          for filesystems like NFS and for the flock() system
128          call. Disabling this option saves about 11k.
129
130source "fs/crypto/Kconfig"
131
132source "fs/code_sign/Kconfig"
133
134source "fs/verity/Kconfig"
135
136source "fs/notify/Kconfig"
137
138source "fs/quota/Kconfig"
139
140source "fs/autofs/Kconfig"
141source "fs/fuse/Kconfig"
142source "fs/overlayfs/Kconfig"
143
144menu "Caches"
145
146source "fs/netfs/Kconfig"
147source "fs/fscache/Kconfig"
148source "fs/cachefiles/Kconfig"
149
150endmenu
151
152if BLOCK
153menu "CD-ROM/DVD Filesystems"
154
155source "fs/isofs/Kconfig"
156source "fs/udf/Kconfig"
157
158endmenu
159endif # BLOCK
160
161if BLOCK
162menu "DOS/FAT/EXFAT/NT Filesystems"
163
164source "fs/fat/Kconfig"
165source "fs/exfat/Kconfig"
166source "fs/ntfs/Kconfig"
167source "fs/ntfs3/Kconfig"
168
169endmenu
170endif # BLOCK
171
172menu "Pseudo filesystems"
173
174source "fs/proc/Kconfig"
175source "fs/kernfs/Kconfig"
176source "fs/sysfs/Kconfig"
177
178config TMPFS
179	bool "Tmpfs virtual memory file system support (former shm fs)"
180	depends on SHMEM
181	select MEMFD_CREATE
182	help
183	  Tmpfs is a file system which keeps all files in virtual memory.
184
185	  Everything in tmpfs is temporary in the sense that no files will be
186	  created on your hard drive. The files live in memory and swap
187	  space. If you unmount a tmpfs instance, everything stored therein is
188	  lost.
189
190	  See <file:Documentation/filesystems/tmpfs.rst> for details.
191
192config TMPFS_POSIX_ACL
193	bool "Tmpfs POSIX Access Control Lists"
194	depends on TMPFS
195	select TMPFS_XATTR
196	select FS_POSIX_ACL
197	help
198	  POSIX Access Control Lists (ACLs) support additional access rights
199	  for users and groups beyond the standard owner/group/world scheme,
200	  and this option selects support for ACLs specifically for tmpfs
201	  filesystems.
202
203	  If you've selected TMPFS, it's possible that you'll also need
204	  this option as there are a number of Linux distros that require
205	  POSIX ACL support under /dev for certain features to work properly.
206	  For example, some distros need this feature for ALSA-related /dev
207	  files for sound to work properly.  In short, if you're not sure,
208	  say Y.
209
210config TMPFS_XATTR
211	bool "Tmpfs extended attributes"
212	depends on TMPFS
213	default n
214	help
215	  Extended attributes are name:value pairs associated with inodes by
216	  the kernel or by users (see the attr(5) manual page for details).
217
218	  This enables support for the trusted.*, security.* and user.*
219	  namespaces.
220
221	  You need this for POSIX ACL support on tmpfs.
222
223	  If unsure, say N.
224
225config TMPFS_INODE64
226	bool "Use 64-bit ino_t by default in tmpfs"
227	depends on TMPFS && 64BIT
228	default n
229	help
230	  tmpfs has historically used only inode numbers as wide as an unsigned
231	  int. In some cases this can cause wraparound, potentially resulting
232	  in multiple files with the same inode number on a single device. This
233	  option makes tmpfs use the full width of ino_t by default, without
234	  needing to specify the inode64 option when mounting.
235
236	  But if a long-lived tmpfs is to be accessed by 32-bit applications so
237	  ancient that opening a file larger than 2GiB fails with EINVAL, then
238	  the INODE64 config option and inode64 mount option risk operations
239	  failing with EOVERFLOW once 33-bit inode numbers are reached.
240
241	  To override this configured default, use the inode32 or inode64
242	  option when mounting.
243
244	  If unsure, say N.
245
246config TMPFS_QUOTA
247	bool "Tmpfs quota support"
248	depends on TMPFS
249	select QUOTA
250	help
251	  Quota support allows to set per user and group limits for tmpfs
252	  usage.  Say Y to enable quota support. Once enabled you can control
253	  user and group quota enforcement with quota, usrquota and grpquota
254	  mount options.
255
256	  If unsure, say N.
257
258config ARCH_SUPPORTS_HUGETLBFS
259	def_bool n
260
261config HUGETLBFS
262	bool "HugeTLB file system support"
263	depends on X86 || IA64 || SPARC64 || ARCH_SUPPORTS_HUGETLBFS || BROKEN
264	depends on (SYSFS || SYSCTL)
265	select MEMFD_CREATE
266	help
267	  hugetlbfs is a filesystem backing for HugeTLB pages, based on
268	  ramfs. For architectures that support it, say Y here and read
269	  <file:Documentation/admin-guide/mm/hugetlbpage.rst> for details.
270
271	  If unsure, say N.
272
273config HUGETLB_PAGE
274	def_bool HUGETLBFS
275
276config HUGETLB_PAGE_OPTIMIZE_VMEMMAP
277	def_bool HUGETLB_PAGE
278	depends on ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP
279	depends on SPARSEMEM_VMEMMAP
280
281config HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON
282	bool "HugeTLB Vmemmap Optimization (HVO) defaults to on"
283	default n
284	depends on HUGETLB_PAGE_OPTIMIZE_VMEMMAP
285	help
286	  The HugeTLB VmemmapvOptimization (HVO) defaults to off. Say Y here to
287	  enable HVO by default. It can be disabled via hugetlb_free_vmemmap=off
288	  (boot command line) or hugetlb_optimize_vmemmap (sysctl).
289
290config ARCH_HAS_GIGANTIC_PAGE
291	bool
292
293source "fs/configfs/Kconfig"
294source "fs/efivarfs/Kconfig"
295
296endmenu
297
298menuconfig MISC_FILESYSTEMS
299	bool "Miscellaneous filesystems"
300	default y
301	help
302	  Say Y here to get to see options for various miscellaneous
303	  filesystems, such as filesystems that came from other
304	  operating systems.
305
306	  This option alone does not add any kernel code.
307
308	  If you say N, all options in this submenu will be skipped and
309	  disabled; if unsure, say Y here.
310
311if MISC_FILESYSTEMS
312
313source "fs/orangefs/Kconfig"
314source "fs/adfs/Kconfig"
315source "fs/affs/Kconfig"
316source "fs/ecryptfs/Kconfig"
317source "fs/hfs/Kconfig"
318source "fs/hfsplus/Kconfig"
319source "fs/befs/Kconfig"
320source "fs/bfs/Kconfig"
321source "fs/efs/Kconfig"
322source "fs/jffs2/Kconfig"
323# UBIFS File system configuration
324source "fs/ubifs/Kconfig"
325source "fs/cramfs/Kconfig"
326source "fs/squashfs/Kconfig"
327source "fs/freevxfs/Kconfig"
328source "fs/minix/Kconfig"
329source "fs/omfs/Kconfig"
330source "fs/hpfs/Kconfig"
331source "fs/qnx4/Kconfig"
332source "fs/qnx6/Kconfig"
333source "fs/romfs/Kconfig"
334source "fs/pstore/Kconfig"
335source "fs/sysv/Kconfig"
336source "fs/ufs/Kconfig"
337source "fs/erofs/Kconfig"
338source "fs/vboxsf/Kconfig"
339
340endif # MISC_FILESYSTEMS
341
342menuconfig NETWORK_FILESYSTEMS
343	bool "Network File Systems"
344	default y
345	depends on NET
346	help
347	  Say Y here to get to see options for network filesystems and
348	  filesystem-related networking code, such as NFS daemon and
349	  RPCSEC security modules.
350
351	  This option alone does not add any kernel code.
352
353	  If you say N, all options in this submenu will be skipped and
354	  disabled; if unsure, say Y here.
355
356if NETWORK_FILESYSTEMS
357
358source "fs/nfs/Kconfig"
359source "fs/nfsd/Kconfig"
360
361config GRACE_PERIOD
362	tristate
363
364config LOCKD
365	tristate
366	depends on FILE_LOCKING
367	select GRACE_PERIOD
368
369config LOCKD_V4
370	bool
371	depends on NFSD || NFS_V3
372	depends on FILE_LOCKING
373	default y
374
375config NFS_ACL_SUPPORT
376	tristate
377	select FS_POSIX_ACL
378
379config NFS_COMMON
380	bool
381	depends on NFSD || NFS_FS || LOCKD
382	default y
383
384config NFS_V4_2_SSC_HELPER
385	bool
386	default y if NFS_V4_2
387
388source "net/sunrpc/Kconfig"
389source "fs/ceph/Kconfig"
390
391source "fs/smb/Kconfig"
392source "fs/coda/Kconfig"
393source "fs/afs/Kconfig"
394source "fs/9p/Kconfig"
395
396endif # NETWORK_FILESYSTEMS
397
398source "fs/nls/Kconfig"
399source "fs/dlm/Kconfig"
400source "fs/unicode/Kconfig"
401source "fs/epfs/Kconfig"
402
403config IO_WQ
404	bool
405
406endmenu
407