diff options
author | Amir Goldstein <amir73il@gmail.com> | 2023-07-07 11:20:41 +0300 |
---|---|---|
committer | Amir Goldstein <amir73il@gmail.com> | 2023-08-12 19:02:50 +0300 |
commit | d9544c1b0d9e14a66936814dcc8a85861ea1b99f (patch) | |
tree | b8c8a2f1daee13141cd107888e932902873569d4 /fs/overlayfs/params.c | |
parent | b0504bfe1b8acdcfb5ef466581d930835ef3c49e (diff) | |
download | linux-d9544c1b0d9e14a66936814dcc8a85861ea1b99f.tar.xz |
ovl: store persistent uuid/fsid with uuid=on
With uuid=on, store a persistent uuid in xattr on the upper dir to
give the overlayfs instance a persistent identifier.
This also makes f_fsid persistent and more reliable for reporting
fid info in fanotify events.
uuid=on is not supported on non-upper overlayfs or with upper fs
that does not support xattrs.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Diffstat (limited to 'fs/overlayfs/params.c')
-rw-r--r-- | fs/overlayfs/params.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/overlayfs/params.c b/fs/overlayfs/params.c index 1ff93467e793..5a59c87c1dfe 100644 --- a/fs/overlayfs/params.c +++ b/fs/overlayfs/params.c @@ -801,6 +801,11 @@ int ovl_fs_params_verify(const struct ovl_fs_context *ctx, config->ovl_volatile = false; } + if (!config->upperdir && config->uuid == OVL_UUID_ON) { + pr_info("option \"uuid=on\" requires an upper fs, falling back to uuid=null.\n"); + config->uuid = OVL_UUID_NULL; + } + /* Resolve verity -> metacopy dependency */ if (config->verity_mode && !config->metacopy) { /* Don't allow explicit specified conflicting combinations */ |