blob: 2ac67e04a6fbede386e3a8e0008a1ad1de2d3f9b [file] [log] [blame]
Thomas Gleixnerec8f24b2019-05-19 13:07:45 +01001# SPDX-License-Identifier: GPL-2.0-only
Miklos Szeredief94b182014-11-20 16:39:59 +01002config OVERLAY_FS
Miklos Szeredie9be9d52014-10-24 00:14:38 +02003 tristate "Overlay filesystem support"
Amir Goldsteinf91a7042023-10-02 17:19:46 +03004 select FS_STACK
Arnd Bergmann72d42502017-05-11 13:34:29 +02005 select EXPORTFS
Miklos Szeredie9be9d52014-10-24 00:14:38 +02006 help
7 An overlay filesystem combines two filesystems - an 'upper' filesystem
8 and a 'lower' filesystem. When a name exists in both filesystems, the
9 object in the 'upper' filesystem is visible while the object in the
10 'lower' filesystem is either hidden or, in the case of directories,
11 merged with the 'upper' object.
12
Mauro Carvalho Chehab72ef5e52020-04-14 18:48:35 +020013 For more information see Documentation/filesystems/overlayfs.rst
Miklos Szeredi688ea0e2016-12-16 11:02:57 +010014
15config OVERLAY_FS_REDIRECT_DIR
Miklos Szeredi4280f742018-05-31 11:06:10 +020016 bool "Overlayfs: turn on redirect directory feature by default"
Miklos Szeredi688ea0e2016-12-16 11:02:57 +010017 depends on OVERLAY_FS
18 help
19 If this config option is enabled then overlay filesystems will use
20 redirects when renaming directories by default. In this case it is
21 still possible to turn off redirects globally with the
22 "redirect_dir=off" module option or on a filesystem instance basis
23 with the "redirect_dir=off" mount option.
24
25 Note, that redirects are not backward compatible. That is, mounting
26 an overlay which has redirects on a kernel that doesn't support this
27 feature will have unexpected results.
Amir Goldstein02bcd152017-06-21 15:28:36 +030028
Miklos Szeredi36cd95df2018-03-07 11:47:15 +010029 If unsure, say N.
30
Miklos Szeredi438c84c22017-12-11 11:28:10 +010031config OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW
32 bool "Overlayfs: follow redirects even if redirects are turned off"
33 default y
34 depends on OVERLAY_FS
35 help
36 Disable this to get a possibly more secure configuration, but that
37 might not be backward compatible with previous kernels.
38
Miklos Szeredi36cd95df2018-03-07 11:47:15 +010039 If backward compatibility is not an issue, then it is safe and
40 recommended to say N here.
41
Mauro Carvalho Chehab72ef5e52020-04-14 18:48:35 +020042 For more information, see Documentation/filesystems/overlayfs.rst
Miklos Szeredi438c84c22017-12-11 11:28:10 +010043
Miklos Szeredi36cd95df2018-03-07 11:47:15 +010044 If unsure, say Y.
45
Amir Goldstein02bcd152017-06-21 15:28:36 +030046config OVERLAY_FS_INDEX
47 bool "Overlayfs: turn on inodes index feature by default"
48 depends on OVERLAY_FS
49 help
50 If this config option is enabled then overlay filesystems will use
Miklos Szeredi4280f742018-05-31 11:06:10 +020051 the index directory to map lower inodes to upper inodes by default.
Amir Goldstein02bcd152017-06-21 15:28:36 +030052 In this case it is still possible to turn off index globally with the
53 "index=off" module option or on a filesystem instance basis with the
54 "index=off" mount option.
55
56 The inodes index feature prevents breaking of lower hardlinks on copy
57 up.
58
Amir Goldstein60b86642018-01-10 23:15:21 +020059 Note, that the inodes index feature is not backward compatible.
60 That is, mounting an overlay which has an inodes index on a kernel
61 that doesn't support this feature will have unexpected results.
Amir Goldsteinf168f102018-01-19 11:26:53 +020062
Miklos Szeredi36cd95df2018-03-07 11:47:15 +010063 If unsure, say N.
64
Amir Goldsteinf168f102018-01-19 11:26:53 +020065config OVERLAY_FS_NFS_EXPORT
66 bool "Overlayfs: turn on NFS export feature by default"
67 depends on OVERLAY_FS
68 depends on OVERLAY_FS_INDEX
Vivek Goyald5791042018-05-11 11:49:27 -040069 depends on !OVERLAY_FS_METACOPY
Amir Goldsteinf168f102018-01-19 11:26:53 +020070 help
71 If this config option is enabled then overlay filesystems will use
Miklos Szeredi4280f742018-05-31 11:06:10 +020072 the index directory to decode overlay NFS file handles by default.
Amir Goldsteinf168f102018-01-19 11:26:53 +020073 In this case, it is still possible to turn off NFS export support
74 globally with the "nfs_export=off" module option or on a filesystem
75 instance basis with the "nfs_export=off" mount option.
76
77 The NFS export feature creates an index on copy up of every file and
78 directory. This full index is used to detect overlay filesystems
79 inconsistencies on lookup, like redirect from multiple upper dirs to
80 the same lower dir. The full index may incur some overhead on mount
81 time, especially when verifying that directory file handles are not
82 stale.
83
84 Note, that the NFS export feature is not backward compatible.
85 That is, mounting an overlay which has a full index on a kernel
86 that doesn't support this feature will have unexpected results.
Miklos Szeredi36cd95df2018-03-07 11:47:15 +010087
88 Most users should say N here and enable this feature on a case-by-
89 case basis with the "nfs_export=on" mount option.
90
91 Say N unless you fully understand the consequences.
Amir Goldstein795939a2018-03-29 09:08:18 +030092
93config OVERLAY_FS_XINO_AUTO
94 bool "Overlayfs: auto enable inode number mapping"
95 default n
96 depends on OVERLAY_FS
Amir Goldstein53afcd32020-02-21 16:34:42 +020097 depends on 64BIT
Amir Goldstein795939a2018-03-29 09:08:18 +030098 help
99 If this config option is enabled then overlay filesystems will use
Colin Ian King637d13b2022-10-07 21:40:54 +0100100 unused high bits in underlying filesystem inode numbers to map all
Amir Goldstein795939a2018-03-29 09:08:18 +0300101 inodes to a unified address space. The mapped 64bit inode numbers
102 might not be compatible with applications that expect 32bit inodes.
103
104 If compatibility with applications that expect 32bit inodes is not an
105 issue, then it is safe and recommended to say Y here.
106
Mauro Carvalho Chehab72ef5e52020-04-14 18:48:35 +0200107 For more information, see Documentation/filesystems/overlayfs.rst
Amir Goldstein795939a2018-03-29 09:08:18 +0300108
109 If unsure, say N.
Vivek Goyald5791042018-05-11 11:49:27 -0400110
111config OVERLAY_FS_METACOPY
112 bool "Overlayfs: turn on metadata only copy up feature by default"
113 depends on OVERLAY_FS
114 select OVERLAY_FS_REDIRECT_DIR
115 help
116 If this config option is enabled then overlay filesystems will
117 copy up only metadata where appropriate and data copy up will
118 happen when a file is opened for WRITE operation. It is still
119 possible to turn off this feature globally with the "metacopy=off"
120 module option or on a filesystem instance basis with the
121 "metacopy=off" mount option.
122
123 Note, that this feature is not backward compatible. That is,
124 mounting an overlay which has metacopy only inodes on a kernel
125 that doesn't support this feature will have unexpected results.
126
127 If unsure, say N.
Andrea Righi36295542023-05-21 10:28:11 +0200128
129config OVERLAY_FS_DEBUG
130 bool "Overlayfs: turn on extra debugging checks"
131 default n
132 depends on OVERLAY_FS
133 help
134 Say Y here to enable extra debugging checks in overlayfs.
135
136 If unsure, say N.