Commit 0c31d675 authored by Miklos Szeredi's avatar Miklos Szeredi

ovl: fix documentation of non-standard behavior

We can now drop description of the ro/rw inconsistency from the
documentation.

Also clarify, that now fully standard compliant behavior can be enabled
with kernel/module/mount options.
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent 670c2324
...@@ -10,10 +10,6 @@ union-filesystems). An overlay-filesystem tries to present a ...@@ -10,10 +10,6 @@ union-filesystems). An overlay-filesystem tries to present a
filesystem which is the result over overlaying one filesystem on top filesystem which is the result over overlaying one filesystem on top
of the other. of the other.
The result will inevitably fail to look exactly like a normal
filesystem for various technical reasons. The expectation is that
many use cases will be able to ignore these differences.
Overlay objects Overlay objects
--------------- ---------------
...@@ -306,27 +302,40 @@ the copied layers will fail the verification of the lower root file handle. ...@@ -306,27 +302,40 @@ the copied layers will fail the verification of the lower root file handle.
Non-standard behavior Non-standard behavior
--------------------- ---------------------
The copy_up operation essentially creates a new, identical file and Overlayfs can now act as a POSIX compliant filesystem with the following
moves it over to the old name. Any open files referring to this inode features turned on:
will access the old data.
1) "redirect_dir"
Enabled with the mount option or module option: "redirect_dir=on" or with
the kernel config option CONFIG_OVERLAY_FS_REDIRECT_DIR=y.
If this feature is disabled, then rename(2) on a lower or merged directory
will fail with EXDEV ("Invalid cross-device link").
2) "inode index"
Enabled with the mount option or module option "index=on" or with the
kernel config option CONFIG_OVERLAY_FS_INDEX=y.
The new file may be on a different filesystem, so both st_dev and st_ino If this feature is disabled and a file with multiple hard links is copied
of the real file may change. The values of st_dev and st_ino returned by up, then this will "break" the link. Changes will not be propagated to
stat(2) on an overlay object are often not the same as the real file other names referring to the same inode.
stat(2) values to prevent the values from changing on copy_up.
Unless "xino" feature is enabled, when overlay layers are not all on the 3) "xino"
same underlying filesystem, the value of st_dev may be different for two
non-directory objects in the same overlay filesystem and the value of
st_ino for directory objects may be non persistent and could change even
while the overlay filesystem is still mounted.
Unless "inode index" feature is enabled, if a file with multiple hard Enabled with the mount option "xino=auto" or "xino=on", with the module
links is copied up, then this will "break" the link. Changes will not be option "xino_auto=on" or with the kernel config option
propagated to other names referring to the same inode. CONFIG_OVERLAY_FS_XINO_AUTO=y. Also implicitly enabled by using the same
underlying filesystem for all layers making up the overlay.
Unless "redirect_dir" feature is enabled, rename(2) on a lower or merged If this feature is disabled or the underlying filesystem doesn't have
directory will fail with EXDEV. enough free bits in the inode number, then overlayfs will not be able to
guarantee that the values of st_ino and st_dev returned by stat(2) and the
value of d_ino returned by readdir(3) will act like on a normal filesystem.
E.g. the value of st_dev may be different for two objects in the same
overlay filesystem and the value of st_ino for directory objects may not be
persistent and could change even while the overlay filesystem is mounted.
Changes to underlying filesystems Changes to underlying filesystems
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment