Thomas Gleixner | ec8f24b | 2019-05-19 13:07:45 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-only |
Miklos Szeredi | ef94b18 | 2014-11-20 16:39:59 +0100 | [diff] [blame] | 2 | config OVERLAY_FS |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 3 | tristate "Overlay filesystem support" |
Arnd Bergmann | 72d4250 | 2017-05-11 13:34:29 +0200 | [diff] [blame] | 4 | select EXPORTFS |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 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 | |
Mauro Carvalho Chehab | 72ef5e5 | 2020-04-14 18:48:35 +0200 | [diff] [blame] | 12 | For more information see Documentation/filesystems/overlayfs.rst |
Miklos Szeredi | 688ea0e | 2016-12-16 11:02:57 +0100 | [diff] [blame] | 13 | |
| 14 | config OVERLAY_FS_REDIRECT_DIR |
Miklos Szeredi | 4280f74 | 2018-05-31 11:06:10 +0200 | [diff] [blame] | 15 | bool "Overlayfs: turn on redirect directory feature by default" |
Miklos Szeredi | 688ea0e | 2016-12-16 11:02:57 +0100 | [diff] [blame] | 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. |
Amir Goldstein | 02bcd15 | 2017-06-21 15:28:36 +0300 | [diff] [blame] | 27 | |
Miklos Szeredi | 36cd95df | 2018-03-07 11:47:15 +0100 | [diff] [blame] | 28 | If unsure, say N. |
| 29 | |
Miklos Szeredi | 438c84c | 2017-12-11 11:28:10 +0100 | [diff] [blame] | 30 | config 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 | |
Miklos Szeredi | 36cd95df | 2018-03-07 11:47:15 +0100 | [diff] [blame] | 38 | If backward compatibility is not an issue, then it is safe and |
| 39 | recommended to say N here. |
| 40 | |
Mauro Carvalho Chehab | 72ef5e5 | 2020-04-14 18:48:35 +0200 | [diff] [blame] | 41 | For more information, see Documentation/filesystems/overlayfs.rst |
Miklos Szeredi | 438c84c | 2017-12-11 11:28:10 +0100 | [diff] [blame] | 42 | |
Miklos Szeredi | 36cd95df | 2018-03-07 11:47:15 +0100 | [diff] [blame] | 43 | If unsure, say Y. |
| 44 | |
Amir Goldstein | 02bcd15 | 2017-06-21 15:28:36 +0300 | [diff] [blame] | 45 | config 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 |
Miklos Szeredi | 4280f74 | 2018-05-31 11:06:10 +0200 | [diff] [blame] | 50 | the index directory to map lower inodes to upper inodes by default. |
Amir Goldstein | 02bcd15 | 2017-06-21 15:28:36 +0300 | [diff] [blame] | 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 | |
Amir Goldstein | 60b8664 | 2018-01-10 23:15:21 +0200 | [diff] [blame] | 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. |
Amir Goldstein | f168f10 | 2018-01-19 11:26:53 +0200 | [diff] [blame] | 61 | |
Miklos Szeredi | 36cd95df | 2018-03-07 11:47:15 +0100 | [diff] [blame] | 62 | If unsure, say N. |
| 63 | |
Amir Goldstein | f168f10 | 2018-01-19 11:26:53 +0200 | [diff] [blame] | 64 | config 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 |
Vivek Goyal | d579104 | 2018-05-11 11:49:27 -0400 | [diff] [blame] | 68 | depends on !OVERLAY_FS_METACOPY |
Amir Goldstein | f168f10 | 2018-01-19 11:26:53 +0200 | [diff] [blame] | 69 | help |
| 70 | If this config option is enabled then overlay filesystems will use |
Miklos Szeredi | 4280f74 | 2018-05-31 11:06:10 +0200 | [diff] [blame] | 71 | the index directory to decode overlay NFS file handles by default. |
Amir Goldstein | f168f10 | 2018-01-19 11:26:53 +0200 | [diff] [blame] | 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. |
Miklos Szeredi | 36cd95df | 2018-03-07 11:47:15 +0100 | [diff] [blame] | 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. |
Amir Goldstein | 795939a | 2018-03-29 09:08:18 +0300 | [diff] [blame] | 91 | |
| 92 | config OVERLAY_FS_XINO_AUTO |
| 93 | bool "Overlayfs: auto enable inode number mapping" |
| 94 | default n |
| 95 | depends on OVERLAY_FS |
Amir Goldstein | 53afcd3 | 2020-02-21 16:34:42 +0200 | [diff] [blame] | 96 | depends on 64BIT |
Amir Goldstein | 795939a | 2018-03-29 09:08:18 +0300 | [diff] [blame] | 97 | help |
| 98 | If this config option is enabled then overlay filesystems will use |
| 99 | unused high bits in undelying filesystem inode numbers to map all |
| 100 | inodes to a unified address space. The mapped 64bit inode numbers |
| 101 | might not be compatible with applications that expect 32bit inodes. |
| 102 | |
| 103 | If compatibility with applications that expect 32bit inodes is not an |
| 104 | issue, then it is safe and recommended to say Y here. |
| 105 | |
Mauro Carvalho Chehab | 72ef5e5 | 2020-04-14 18:48:35 +0200 | [diff] [blame] | 106 | For more information, see Documentation/filesystems/overlayfs.rst |
Amir Goldstein | 795939a | 2018-03-29 09:08:18 +0300 | [diff] [blame] | 107 | |
| 108 | If unsure, say N. |
Vivek Goyal | d579104 | 2018-05-11 11:49:27 -0400 | [diff] [blame] | 109 | |
| 110 | config OVERLAY_FS_METACOPY |
| 111 | bool "Overlayfs: turn on metadata only copy up feature by default" |
| 112 | depends on OVERLAY_FS |
| 113 | select OVERLAY_FS_REDIRECT_DIR |
| 114 | help |
| 115 | If this config option is enabled then overlay filesystems will |
| 116 | copy up only metadata where appropriate and data copy up will |
| 117 | happen when a file is opened for WRITE operation. It is still |
| 118 | possible to turn off this feature globally with the "metacopy=off" |
| 119 | module option or on a filesystem instance basis with the |
| 120 | "metacopy=off" mount option. |
| 121 | |
| 122 | Note, that this feature is not backward compatible. That is, |
| 123 | mounting an overlay which has metacopy only inodes on a kernel |
| 124 | that doesn't support this feature will have unexpected results. |
| 125 | |
| 126 | If unsure, say N. |