ovl: introduce data-only lower layers
authorAmir Goldstein <amir73il@gmail.com>
Thu, 27 Apr 2023 09:48:46 +0000 (12:48 +0300)
committerAmir Goldstein <amir73il@gmail.com>
Mon, 19 Jun 2023 11:01:13 +0000 (14:01 +0300)
commit37ebf056d6cfc6638c821386bc33a9602bbc0d28
tree6afbbc69d724e289a11e7985c3d991986810ccb5
parent9e88f9052415289f2789abb6ae68a40a4701b8e1
ovl: introduce data-only lower layers

Introduce the format lowerdir=lower1:lower2::lowerdata1::lowerdata2
where the lower layers on the right of the :: separators are not merged
into the overlayfs merge dirs.

Data-only lower layers are only allowed at the bottom of the stack.

The files in those layers are only meant to be accessible via absolute
redirect from metacopy files in lower layers.  Following changes will
implement lookup in the data layers.

This feature was requested for composefs ostree use case, where the
lower data layer should only be accessiable via absolute redirects
from metacopy inodes.

The lower data layers are not required to a have a unique uuid or any
uuid at all, because they are never used to compose the overlayfs inode
st_ino/st_dev.

Reviewed-by: Alexander Larsson <alexl@redhat.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Documentation/filesystems/overlayfs.rst
fs/overlayfs/namei.c
fs/overlayfs/ovl_entry.h
fs/overlayfs/super.c