diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-02-07 03:56:15 +0100 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-02-08 21:19:59 +0100 |
commit | a4af51ce229b1e1eab003966dbfebf9d80093a77 (patch) | |
tree | 764a2915360b2a16216a5e7e873361e4716ad7a2 /fs/f2fs | |
parent | Linux 6.8-rc1 (diff) | |
download | linux-a4af51ce229b1e1eab003966dbfebf9d80093a77.tar.xz linux-a4af51ce229b1e1eab003966dbfebf9d80093a77.zip |
fs: super_set_uuid()
Some weird old filesytems have UUID-like things that we wish to expose
as UUIDs, but are smaller; add a length field so that the new
FS_IOC_(GET|SET)UUID ioctls can handle them in generic code.
And add a helper super_set_uuid(), for setting nonstandard length uuids.
Helper is now required for the new FS_IOC_GETUUID ioctl; if
super_set_uuid() hasn't been called, the ioctl won't be supported.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Link: https://lore.kernel.org/r/20240207025624.1019754-2-kent.overstreet@linux.dev
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index d45ab0992ae5..93bcd4e5864e 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -4496,7 +4496,7 @@ try_onemore: sb->s_time_gran = 1; sb->s_flags = (sb->s_flags & ~SB_POSIXACL) | (test_opt(sbi, POSIX_ACL) ? SB_POSIXACL : 0); - memcpy(&sb->s_uuid, raw_super->uuid, sizeof(raw_super->uuid)); + super_set_uuid(sb, (void *) raw_super->uuid, sizeof(raw_super->uuid)); sb->s_iflags |= SB_I_CGROUPWB; /* init f2fs-specific super block info */ |