diff options
author | Amir Goldstein <amir73il@gmail.com> | 2023-07-07 11:26:29 +0300 |
---|---|---|
committer | Amir Goldstein <amir73il@gmail.com> | 2023-08-12 19:02:50 +0300 |
commit | cbb44f0935974bba997f8db0458fac5739ae0009 (patch) | |
tree | c32f08f3a699457bbcf17a0e6b6e180d50732233 /fs/overlayfs/params.c | |
parent | d9544c1b0d9e14a66936814dcc8a85861ea1b99f (diff) | |
download | linux-cbb44f0935974bba997f8db0458fac5739ae0009.tar.xz |
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>
Diffstat (limited to 'fs/overlayfs/params.c')
-rw-r--r-- | fs/overlayfs/params.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/overlayfs/params.c b/fs/overlayfs/params.c index 5a59c87c1dfe..3fc01feb5f12 100644 --- a/fs/overlayfs/params.c +++ b/fs/overlayfs/params.c @@ -68,6 +68,7 @@ static const struct constant_table ovl_parameter_bool[] = { static const struct constant_table ovl_parameter_uuid[] = { { "off", OVL_UUID_OFF }, { "null", OVL_UUID_NULL }, + { "auto", OVL_UUID_AUTO }, { "on", OVL_UUID_ON }, {} }; @@ -79,7 +80,7 @@ static const char *ovl_uuid_mode(struct ovl_config *config) static int ovl_uuid_def(void) { - return OVL_UUID_NULL; + return OVL_UUID_AUTO; } static const struct constant_table ovl_parameter_xino[] = { |