Skip to content

Commit bdc10bd

Browse files
committed
overlayfs.rst: use consistent feature names
Use the feature names "metacopy" and "index" consistently throughout the document. Covert the numbered list of features "redirect_dir", "index", "xino" to section headings, so that those features could be referenced in the document by their name. Reviewed-by: Bagas Sanjaya <[email protected]> Signed-off-by: Amir Goldstein <[email protected]>
1 parent 2c3ef4f commit bdc10bd

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

Documentation/filesystems/overlayfs.rst

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ objects in the original filesystem.
3939
On 64bit systems, even if all overlay layers are not on the same
4040
underlying filesystem, the same compliant behavior could be achieved
4141
with the "xino" feature. The "xino" feature composes a unique object
42-
identifier from the real object st_ino and an underlying fsid index.
42+
identifier from the real object st_ino and an underlying fsid number.
4343
The "xino" feature uses the high inode number bits for fsid, because the
4444
underlying filesystems rarely use the high inode number bits. In case
4545
the underlying inode number does overflow into the high xino bits, overlay
@@ -356,7 +356,7 @@ as an octal characters (\072) when displayed in /proc/self/mountinfo.
356356
Metadata only copy up
357357
---------------------
358358

359-
When metadata only copy up feature is enabled, overlayfs will only copy
359+
When the "metacopy" feature is enabled, overlayfs will only copy
360360
up metadata (as opposed to whole file), when a metadata specific operation
361361
like chown/chmod is performed. Full file will be copied up later when
362362
file is opened for WRITE operation.
@@ -492,27 +492,27 @@ though it will not result in a crash or deadlock.
492492

493493
Mounting an overlay using an upper layer path, where the upper layer path
494494
was previously used by another mounted overlay in combination with a
495-
different lower layer path, is allowed, unless the "inodes index" feature
496-
or "metadata only copy up" feature is enabled.
495+
different lower layer path, is allowed, unless the "index" or "metacopy"
496+
features are enabled.
497497

498-
With the "inodes index" feature, on the first time mount, an NFS file
498+
With the "index" feature, on the first time mount, an NFS file
499499
handle of the lower layer root directory, along with the UUID of the lower
500500
filesystem, are encoded and stored in the "trusted.overlay.origin" extended
501501
attribute on the upper layer root directory. On subsequent mount attempts,
502502
the lower root directory file handle and lower filesystem UUID are compared
503503
to the stored origin in upper root directory. On failure to verify the
504504
lower root origin, mount will fail with ESTALE. An overlayfs mount with
505-
"inodes index" enabled will fail with EOPNOTSUPP if the lower filesystem
505+
"index" enabled will fail with EOPNOTSUPP if the lower filesystem
506506
does not support NFS export, lower filesystem does not have a valid UUID or
507507
if the upper filesystem does not support extended attributes.
508508

509-
For "metadata only copy up" feature there is no verification mechanism at
509+
For the "metacopy" feature, there is no verification mechanism at
510510
mount time. So if same upper is mounted with different set of lower, mount
511511
probably will succeed but expect the unexpected later on. So don't do it.
512512

513513
It is quite a common practice to copy overlay layers to a different
514514
directory tree on the same or different underlying filesystem, and even
515-
to a different machine. With the "inodes index" feature, trying to mount
515+
to a different machine. With the "index" feature, trying to mount
516516
the copied layers will fail the verification of the lower root file handle.
517517

518518
Nesting overlayfs mounts
@@ -560,15 +560,17 @@ file for write or truncating the file will not be denied with ETXTBSY.
560560
The following options allow overlayfs to act more like a standards
561561
compliant filesystem:
562562

563-
1) "redirect_dir"
563+
redirect_dir
564+
````````````
564565

565566
Enabled with the mount option or module option: "redirect_dir=on" or with
566567
the kernel config option CONFIG_OVERLAY_FS_REDIRECT_DIR=y.
567568

568569
If this feature is disabled, then rename(2) on a lower or merged directory
569570
will fail with EXDEV ("Invalid cross-device link").
570571

571-
2) "inode index"
572+
index
573+
`````
572574

573575
Enabled with the mount option or module option "index=on" or with the
574576
kernel config option CONFIG_OVERLAY_FS_INDEX=y.
@@ -577,7 +579,8 @@ If this feature is disabled and a file with multiple hard links is copied
577579
up, then this will "break" the link. Changes will not be propagated to
578580
other names referring to the same inode.
579581

580-
3) "xino"
582+
xino
583+
````
581584

582585
Enabled with the mount option "xino=auto" or "xino=on", with the module
583586
option "xino_auto=on" or with the kernel config option
@@ -604,7 +607,7 @@ a crash or deadlock.
604607

605608
Offline changes, when the overlay is not mounted, are allowed to the
606609
upper tree. Offline changes to the lower tree are only allowed if the
607-
"metadata only copy up", "inode index", "xino" and "redirect_dir" features
610+
"metacopy", "index", "xino" and "redirect_dir" features
608611
have not been used. If the lower tree is modified and any of these
609612
features has been used, the behavior of the overlay is undefined,
610613
though it will not result in a crash or deadlock.

0 commit comments

Comments
 (0)