]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
f2fs: add support for FS_IOC_GETFSSYSFSPATH
authorChao Yu <chao@kernel.org>
Wed, 15 May 2024 08:12:33 +0000 (16:12 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 12 Jun 2024 15:46:02 +0000 (15:46 +0000)
FS_IOC_GETFSSYSFSPATH ioctl expects sysfs sub-path of a filesystem, the
format can be "$FSTYP/$SYSFS_IDENTIFIER" under /sys/fs, it can helps to
standardizes exporting sysfs datas across filesystems.

This patch wires up FS_IOC_GETFSSYSFSPATH for f2fs, it will output
"f2fs/<dev>".

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/super.c

index 1f1b3647a998c00054eace82ec46d6bf18d89a1c..4a1bc8f40f9ab195cee52123b53548b64b2245d5 100644 (file)
@@ -4481,6 +4481,7 @@ try_onemore:
        sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
                (test_opt(sbi, POSIX_ACL) ? SB_POSIXACL : 0);
        super_set_uuid(sb, (void *) raw_super->uuid, sizeof(raw_super->uuid));
+       super_set_sysfs_name_bdev(sb);
        sb->s_iflags |= SB_I_CGROUPWB;
 
        /* init f2fs-specific super block info */