Kconfig 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. config OVERLAY_FS
  3. tristate "Overlay filesystem support"
  4. select EXPORTFS
  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. For more information see Documentation/filesystems/overlayfs.rst
  12. config OVERLAY_FS_REDIRECT_DIR
  13. bool "Overlayfs: turn on redirect directory feature by default"
  14. depends on OVERLAY_FS
  15. help
  16. If this config option is enabled then overlay filesystems will use
  17. redirects when renaming directories by default. In this case it is
  18. still possible to turn off redirects globally with the
  19. "redirect_dir=off" module option or on a filesystem instance basis
  20. with the "redirect_dir=off" mount option.
  21. Note, that redirects are not backward compatible. That is, mounting
  22. an overlay which has redirects on a kernel that doesn't support this
  23. feature will have unexpected results.
  24. If unsure, say N.
  25. config OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW
  26. bool "Overlayfs: follow redirects even if redirects are turned off"
  27. default y
  28. depends on OVERLAY_FS
  29. help
  30. Disable this to get a possibly more secure configuration, but that
  31. might not be backward compatible with previous kernels.
  32. If backward compatibility is not an issue, then it is safe and
  33. recommended to say N here.
  34. For more information, see Documentation/filesystems/overlayfs.rst
  35. If unsure, say Y.
  36. config OVERLAY_FS_INDEX
  37. bool "Overlayfs: turn on inodes index feature by default"
  38. depends on OVERLAY_FS
  39. help
  40. If this config option is enabled then overlay filesystems will use
  41. the index directory to map lower inodes to upper inodes by default.
  42. In this case it is still possible to turn off index globally with the
  43. "index=off" module option or on a filesystem instance basis with the
  44. "index=off" mount option.
  45. The inodes index feature prevents breaking of lower hardlinks on copy
  46. up.
  47. Note, that the inodes index feature is not backward compatible.
  48. That is, mounting an overlay which has an inodes index on a kernel
  49. that doesn't support this feature will have unexpected results.
  50. If unsure, say N.
  51. config OVERLAY_FS_NFS_EXPORT
  52. bool "Overlayfs: turn on NFS export feature by default"
  53. depends on OVERLAY_FS
  54. depends on OVERLAY_FS_INDEX
  55. depends on !OVERLAY_FS_METACOPY
  56. help
  57. If this config option is enabled then overlay filesystems will use
  58. the index directory to decode overlay NFS file handles by default.
  59. In this case, it is still possible to turn off NFS export support
  60. globally with the "nfs_export=off" module option or on a filesystem
  61. instance basis with the "nfs_export=off" mount option.
  62. The NFS export feature creates an index on copy up of every file and
  63. directory. This full index is used to detect overlay filesystems
  64. inconsistencies on lookup, like redirect from multiple upper dirs to
  65. the same lower dir. The full index may incur some overhead on mount
  66. time, especially when verifying that directory file handles are not
  67. stale.
  68. Note, that the NFS export feature is not backward compatible.
  69. That is, mounting an overlay which has a full index on a kernel
  70. that doesn't support this feature will have unexpected results.
  71. Most users should say N here and enable this feature on a case-by-
  72. case basis with the "nfs_export=on" mount option.
  73. Say N unless you fully understand the consequences.
  74. config OVERLAY_FS_XINO_AUTO
  75. bool "Overlayfs: auto enable inode number mapping"
  76. default n
  77. depends on OVERLAY_FS
  78. depends on 64BIT
  79. help
  80. If this config option is enabled then overlay filesystems will use
  81. unused high bits in undelying filesystem inode numbers to map all
  82. inodes to a unified address space. The mapped 64bit inode numbers
  83. might not be compatible with applications that expect 32bit inodes.
  84. If compatibility with applications that expect 32bit inodes is not an
  85. issue, then it is safe and recommended to say Y here.
  86. For more information, see Documentation/filesystems/overlayfs.rst
  87. If unsure, say N.
  88. config OVERLAY_FS_METACOPY
  89. bool "Overlayfs: turn on metadata only copy up feature by default"
  90. depends on OVERLAY_FS
  91. select OVERLAY_FS_REDIRECT_DIR
  92. help
  93. If this config option is enabled then overlay filesystems will
  94. copy up only metadata where appropriate and data copy up will
  95. happen when a file is opened for WRITE operation. It is still
  96. possible to turn off this feature globally with the "metacopy=off"
  97. module option or on a filesystem instance basis with the
  98. "metacopy=off" mount option.
  99. Note, that this feature is not backward compatible. That is,
  100. mounting an overlay which has metacopy only inodes on a kernel
  101. that doesn't support this feature will have unexpected results.
  102. If unsure, say N.