On Tue, Jul 19, 2022 at 8:55 AM Jeremy Bongio <bongiojp@xxxxxxxxx> wrote: > > This fixes a race between changing the ext4 superblock uuid and operations > like mounting, resizing, changing features, etc. > > Reviewed-by: Theodore Ts'o <tytso@xxxxxxx> > Signed-off-by: Jeremy Bongio <bongiojp@xxxxxxxxx> > --- > > This pair of ioctls may be implemented in more filesystems in the future, > namely XFS. > > +++ b/fs/ext4/ext4.h > @@ -724,6 +724,8 @@ enum { > #define EXT4_IOC_GETSTATE _IOW('f', 41, __u32) > #define EXT4_IOC_GET_ES_CACHE _IOWR('f', 42, struct fiemap) > #define EXT4_IOC_CHECKPOINT _IOW('f', 43, __u32) > +#define EXT4_IOC_GETFSUUID _IOR('f', 44, struct fsuuid) > +#define EXT4_IOC_SETFSUUID _IOW('f', 44, struct fsuuid) The implementation looks good to me, but maybe it should be defined in the UAPI headers in a filesystem-independent way? Having it in a private header means it will not be available to portable user programs, and will be hidden from tools like strace that parse the uapi headers to find ioctl definitions. Arnd