fs: super_set_uuid()
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 7 Feb 2024 02:56:15 +0000 (21:56 -0500)
committerChristian Brauner <brauner@kernel.org>
Thu, 8 Feb 2024 20:19:59 +0000 (21:19 +0100)
commita4af51ce229b1e1eab003966dbfebf9d80093a77
tree764a2915360b2a16216a5e7e873361e4716ad7a2
parent6613476e225e090cc9aad49be7fa504e290dd33d
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>
fs/ext4/super.c
fs/f2fs/super.c
fs/gfs2/ops_fstype.c
fs/kernfs/mount.c
fs/ocfs2/super.c
fs/ubifs/super.c
fs/xfs/xfs_mount.c
include/linux/fs.h
mm/shmem.c