]> git.baikalelectronics.ru Git - kernel.git/commit
ovl: constant st_ino for non-samefs with xino
authorAmir Goldstein <amir73il@gmail.com>
Tue, 7 Nov 2017 11:55:04 +0000 (13:55 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 12 Apr 2018 10:04:50 +0000 (12:04 +0200)
commit365364a9725dae4e95801eb28e93f3c1b255a4ea
treebab0024b22cbfacdacc7892cdad93129101fe8bc
parent1e40382e46c73c7ea8c95c4f5773d7b811b509b7
ovl: constant st_ino for non-samefs with xino

On 64bit systems, when overlay layers are not all on the same fs, but
all inode numbers of underlying fs are not using the high bits, use the
high bits to partition the overlay st_ino address space.  The high bits
hold the fsid (upper fsid is 0).  This way overlay inode numbers are unique
and all inodes use overlay st_dev.  Inode numbers are also persistent
for a given layer configuration.

Currently, our only indication for available high ino bits is from a
filesystem that supports file handles and uses the default encode_fh()
operation, which encodes a 32bit inode number.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/inode.c
fs/overlayfs/overlayfs.h
fs/overlayfs/ovl_entry.h
fs/overlayfs/super.c
fs/overlayfs/util.c