ovl: auto generate uuid for new overlay filesystems
authorAmir Goldstein <amir73il@gmail.com>
Fri, 7 Jul 2023 08:26:29 +0000 (11:26 +0300)
committerAmir Goldstein <amir73il@gmail.com>
Sat, 12 Aug 2023 16:02:50 +0000 (19:02 +0300)
commitcbb44f0935974bba997f8db0458fac5739ae0009
treec32f08f3a699457bbcf17a0e6b6e180d50732233
parentd9544c1b0d9e14a66936814dcc8a85861ea1b99f
ovl: auto generate uuid for new overlay filesystems

Add a new mount option uuid=auto, which is the default.

If a persistent UUID xattr is found it is used.

Otherwise, an existing ovelrayfs with copied up subdirs in upper dir
that was never mounted with uuid=on retains the null UUID.

A new overlayfs with no copied up subdirs, generates the persistent UUID
on first mount.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Documentation/filesystems/overlayfs.rst
fs/overlayfs/overlayfs.h
fs/overlayfs/params.c
fs/overlayfs/util.c