linux/fs/overlayfs
Amir Goldstein 795939a93e ovl: add support for "xino" mount and config options
With mount option "xino=on", mounter declares that there are enough
free high bits in underlying fs to hold the layer fsid.
If overlayfs does encounter underlying inodes using the high xino
bits reserved for layer fsid, a warning will be emitted and the original
inode number will be used.

The mount option name "xino" goes after a similar meaning mount option
of aufs, but in overlayfs case, the mapping is stateless.

An example for a use case of "xino=on" is when upper/lower is on an xfs
filesystem. xfs uses 64bit inode numbers, but it currently never uses the
upper 8bit for inode numbers exposed via stat(2) and that is not likely to
change in the future without user opting-in for a new xfs feature. The
actual number of unused upper bit is much larger and determined by the xfs
filesystem geometry (64 - agno_log - agblklog - inopblog). That means
that for all practical purpose, there are enough unused bits in xfs
inode numbers for more than OVL_MAX_STACK unique fsid's.

Another use case of "xino=on" is when upper/lower is on tmpfs. tmpfs inode
numbers are allocated sequentially since boot, so they will practially
never use the high inode number bits.

For compatibility with applications that expect 32bit inodes, the feature
can be disabled with "xino=off". The option "xino=auto" automatically
detects underlying filesystem that use 32bit inodes and enables the
feature. The Kconfig option OVERLAY_FS_XINO_AUTO and module parameter of
the same name, determine if the default mode for overlayfs mount is
"xino=auto" or "xino=off".

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-04-12 12:04:50 +02:00
..
copy_up.c ovl: disambiguate ovl_encode_fh() 2018-04-12 12:04:49 +02:00
dir.c ovl: whiteout index when union nlink drops to zero 2018-01-24 11:25:56 +01:00
export.c ovl: consistent i_ino for non-samefs with xino 2018-04-12 12:04:50 +02:00
inode.c ovl: consistent i_ino for non-samefs with xino 2018-04-12 12:04:50 +02:00
Kconfig ovl: add support for "xino" mount and config options 2018-04-12 12:04:50 +02:00
Makefile ovl: encode pure upper file handles 2018-01-24 11:25:59 +01:00
namei.c ovl: consistent i_ino for non-samefs with xino 2018-04-12 12:04:50 +02:00
overlayfs.h ovl: consistent i_ino for non-samefs with xino 2018-04-12 12:04:50 +02:00
ovl_entry.h ovl: add support for "xino" mount and config options 2018-04-12 12:04:50 +02:00
readdir.c ovl: consistent d_ino for non-samefs with xino 2018-04-12 12:04:50 +02:00
super.c ovl: add support for "xino" mount and config options 2018-04-12 12:04:50 +02:00
util.c ovl: constant st_ino for non-samefs with xino 2018-04-12 12:04:50 +02:00