Lines Matching +full:s +full:- +full:merged
1 .. SPDX-License-Identifier: GPL-2.0
10 overlay-filesystem functionality in Linux (sometimes referred to as
11 union-filesystems). An overlay-filesystem tries to present a
17 ---------------
25 While directories will report an st_dev from the overlay-filesystem,
26 non-directory objects may report an st_dev from the lower filesystem or
29 over the lifetime of a non-directory object. Many applications and
48 The "xino" feature can be enabled with the "-o xino=on" overlay mount option.
51 the lifetime of the filesystem. The "-o xino=auto" overlay mount option
60 +--------------+------------+------------+-----------------+----------------+
65 +--------------+-----+------+-----+------+--------+--------+--------+-------+
68 +--------------+-----+------+-----+------+--------+--------+--------+-------+
72 +--------------+-----+------+-----+------+--------+--------+--------+-------+
74 +--------------+-----+------+-----+------+--------+--------+--------+-------+
77 +--------------+-----+------+-----+------+--------+--------+--------+-------+
84 ---------------
86 An overlay filesystem combines two filesystems - an 'upper' filesystem
90 merged with the 'upper' object.
106 A read-only overlay of two read-only filesystems may use any
110 -----------
113 upper and lower filesystems and refers to a non-directory in either,
114 then the lower object is hidden - the name refers only to the upper
117 Where both upper and lower objects are directories, a merged directory
121 "upperdir" are combined into a merged directory:
123 mount -t overlay overlay -olowerdir=/lower,upperdir=/upper,\
124 workdir=/work /merged
129 Then whenever a lookup is requested in such a merged directory, the
132 actual lookups find directories, both are stored and a merged
136 Only the lists of names from directories are merged. Other content
141 --------------------------------
146 directories (non-directories are always opaque).
149 When a whiteout is found in the upper level of a merged directory, any
158 -------
160 When a 'readdir' request is made on a merged directory, the upper and
161 lower directories are each read and the name lists merged in the
162 obvious way (upper is read first, then lower - entries that already
163 exist are not re-added). This merged name list is cached in the
170 This means that changes to the merged directory do not appear while a
177 - read part of a directory
178 - remember an offset, and close the directory
179 - re-open the directory some time later
180 - seek to the remembered offset
186 Readdir on directories that are not merged is simply handled by the
190 --------------------
192 When renaming a directory that is on the lower layer or merged (i.e. the
211 - OVERLAY_FS_REDIRECT_DIR:
213 - OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW:
221 - "redirect_dir=BOOL":
223 - "redirect_always_follow=BOOL":
225 - "redirect_max=NUM":
230 - "redirect_dir=on":
232 - "redirect_dir=follow":
234 - "redirect_dir=nofollow":
236 - "redirect_dir=off":
243 on the index entry. On lookup of a merged directory, if the upper
254 Non-directories
255 ---------------
257 Objects that are not directories (files, symlinks, device-special
260 the requires write-access, such as opening for write access, changing
262 to the upper filesystem (copy_up). Note that creating a hard-link
267 opened for read-write but the data is not modified.
270 exists in the upper filesystem - creating it and any parents as
272 mode, mtime, symlink-target etc.) and then if the object is a file, the
278 filesystem - future operations on the file are barely noticed by the
284 ----------------
292 3) non-mounting task MAY gain additional privileges through the overlay,
316 mount -t overlay overlay -olowerdir=/lower,upperdir=/upper,... /merged
320 cp -a /lower /upper
321 mount --bind /upper /merged
324 the time of copy (on-demand vs. up-front).
328 ---------------------
333 mount -t overlay overlay -olowerdir=/lower1:/lower2:/lower3 /merged
336 that case the overlay will be read-only.
345 mount -t overlay overlay -olowerdir=/a\:lower\:\:dir /merged
357 ---------------------
387 Data-only lower layers
388 ----------------------
403 as "data-only" lower layers, using double colon ("::") separators.
404 A normal lower layer is not allowed to be below a data-only layer, so single
410 mount -t overlay overlay -olowerdir=/l1:/l2:/l3::/do1::/do2 /merged
412 The paths of files in the "data-only" lower layers are not visible in the
413 merged overlayfs directories and the metadata and st_ino/st_dev of files
414 in the "data-only" lower layers are not visible in overlayfs inodes.
416 Only the data of the files in the "data-only" lower layers may be visible
418 to the absolute path of the "lower data" file in the "data-only" lower layer.
420 Since kernel version v6.8, "data-only" lower layers can also be added using
431 fs-verity support
432 ----------------------
435 fs-verity enabled and overlay verity support is enabled, then the
442 that was in the lower at the time of the copy-up. If at any time
446 digest check, or from a later read due to fs-verity) and a detailed
447 error is printed to the kernel logs. For more details of how fs-verity
454 layer is fully trusted (by using dm-verity or something similar), then
457 directories are specified as "Data-only", then they can only supply
464 - "off":
467 - "on":
472 - "require":
475 will only be used if the data file has fs-verity enabled,
476 otherwise a full copy-up is used.
479 --------------------------
519 Non-standard behavior
520 ---------------------
530 b) If a file residing on a lower layer is opened for read-only and then
545 If this feature is disabled, then rename(2) on a lower or merged directory
546 will fail with EXDEV ("Invalid cross-device link").
575 ---------------------------------
597 When the NFS export feature is enabled, a lookup of a merged directory,
603 will not be merged with the upper directory.
608 ----------
616 non-directory object, the index entry is a hard link to the upper inode.
624 1. For a non-upper object, encode a lower file handle from lower inode
626 3. For a pure-upper object and for an existing non-indexed upper object,
630 - Header including path type information (e.g. lower/upper)
631 - UUID of the underlying filesystem
632 - Underlying filesystem encoding of underlying inode
644 5. For a non-directory, instantiate a disconnected overlay dentry from the
649 Decoding a non-directory file handle may return a disconnected dentry.
666 The overlay filesystem does not support non-directory connectable file
675 read-write mount and will result in an error.
685 -------------
690 - "null":
692 - "off":
695 - "on":
700 - "auto": (default)
709 --------------
721 VFS. If any writeback error occurs on the upperdir's filesystem after a
737 ----------
739 The "-o userxattr" mount option forces overlayfs to use the
745 ---------
747 There's a testsuite originally developed by David Howells and currently
750 https://github.com/amir73il/unionmount-testsuite.git
754 # cd unionmount-testsuite
755 # ./run --ov --verify