treewide: Add SPDX license identifier - Makefile/Kconfig
[linux-2.6-block.git] / fs / overlayfs / Kconfig
CommitLineData
ec8f24b7 1# SPDX-License-Identifier: GPL-2.0-only
ef94b186 2config OVERLAY_FS
e9be9d5e 3 tristate "Overlay filesystem support"
72d42504 4 select EXPORTFS
e9be9d5e
MS
5 help
6 An overlay filesystem combines two filesystems - an 'upper' filesystem
7 and a 'lower' filesystem. When a name exists in both filesystems, the
8 object in the 'upper' filesystem is visible while the object in the
9 'lower' filesystem is either hidden or, in the case of directories,
10 merged with the 'upper' object.
11
12 For more information see Documentation/filesystems/overlayfs.txt
688ea0e5
MS
13
14config OVERLAY_FS_REDIRECT_DIR
4280f74a 15 bool "Overlayfs: turn on redirect directory feature by default"
688ea0e5
MS
16 depends on OVERLAY_FS
17 help
18 If this config option is enabled then overlay filesystems will use
19 redirects when renaming directories by default. In this case it is
20 still possible to turn off redirects globally with the
21 "redirect_dir=off" module option or on a filesystem instance basis
22 with the "redirect_dir=off" mount option.
23
24 Note, that redirects are not backward compatible. That is, mounting
25 an overlay which has redirects on a kernel that doesn't support this
26 feature will have unexpected results.
02bcd157 27
36cd95df
MS
28 If unsure, say N.
29
438c84c2
MS
30config OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW
31 bool "Overlayfs: follow redirects even if redirects are turned off"
32 default y
33 depends on OVERLAY_FS
34 help
35 Disable this to get a possibly more secure configuration, but that
36 might not be backward compatible with previous kernels.
37
36cd95df
MS
38 If backward compatibility is not an issue, then it is safe and
39 recommended to say N here.
40
438c84c2
MS
41 For more information, see Documentation/filesystems/overlayfs.txt
42
36cd95df
MS
43 If unsure, say Y.
44
02bcd157
AG
45config OVERLAY_FS_INDEX
46 bool "Overlayfs: turn on inodes index feature by default"
47 depends on OVERLAY_FS
48 help
49 If this config option is enabled then overlay filesystems will use
4280f74a 50 the index directory to map lower inodes to upper inodes by default.
02bcd157
AG
51 In this case it is still possible to turn off index globally with the
52 "index=off" module option or on a filesystem instance basis with the
53 "index=off" mount option.
54
55 The inodes index feature prevents breaking of lower hardlinks on copy
56 up.
57
60b86642
AG
58 Note, that the inodes index feature is not backward compatible.
59 That is, mounting an overlay which has an inodes index on a kernel
60 that doesn't support this feature will have unexpected results.
f168f109 61
36cd95df
MS
62 If unsure, say N.
63
f168f109
AG
64config OVERLAY_FS_NFS_EXPORT
65 bool "Overlayfs: turn on NFS export feature by default"
66 depends on OVERLAY_FS
67 depends on OVERLAY_FS_INDEX
d5791044 68 depends on !OVERLAY_FS_METACOPY
f168f109
AG
69 help
70 If this config option is enabled then overlay filesystems will use
4280f74a 71 the index directory to decode overlay NFS file handles by default.
f168f109
AG
72 In this case, it is still possible to turn off NFS export support
73 globally with the "nfs_export=off" module option or on a filesystem
74 instance basis with the "nfs_export=off" mount option.
75
76 The NFS export feature creates an index on copy up of every file and
77 directory. This full index is used to detect overlay filesystems
78 inconsistencies on lookup, like redirect from multiple upper dirs to
79 the same lower dir. The full index may incur some overhead on mount
80 time, especially when verifying that directory file handles are not
81 stale.
82
83 Note, that the NFS export feature is not backward compatible.
84 That is, mounting an overlay which has a full index on a kernel
85 that doesn't support this feature will have unexpected results.
36cd95df
MS
86
87 Most users should say N here and enable this feature on a case-by-
88 case basis with the "nfs_export=on" mount option.
89
90 Say N unless you fully understand the consequences.
795939a9
AG
91
92config OVERLAY_FS_XINO_AUTO
93 bool "Overlayfs: auto enable inode number mapping"
94 default n
95 depends on OVERLAY_FS
96 help
97 If this config option is enabled then overlay filesystems will use
98 unused high bits in undelying filesystem inode numbers to map all
99 inodes to a unified address space. The mapped 64bit inode numbers
100 might not be compatible with applications that expect 32bit inodes.
101
102 If compatibility with applications that expect 32bit inodes is not an
103 issue, then it is safe and recommended to say Y here.
104
105 For more information, see Documentation/filesystems/overlayfs.txt
106
107 If unsure, say N.
d5791044
VG
108
109config OVERLAY_FS_METACOPY
110 bool "Overlayfs: turn on metadata only copy up feature by default"
111 depends on OVERLAY_FS
112 select OVERLAY_FS_REDIRECT_DIR
113 help
114 If this config option is enabled then overlay filesystems will
115 copy up only metadata where appropriate and data copy up will
116 happen when a file is opened for WRITE operation. It is still
117 possible to turn off this feature globally with the "metacopy=off"
118 module option or on a filesystem instance basis with the
119 "metacopy=off" mount option.
120
121 Note, that this feature is not backward compatible. That is,
122 mounting an overlay which has metacopy only inodes on a kernel
123 that doesn't support this feature will have unexpected results.
124
125 If unsure, say N.