ext4: add support for FS_IOC_GETFSSYSFSPATH
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 15 Mar 2024 03:53:02 +0000 (23:53 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 2 May 2024 19:21:23 +0000 (15:21 -0400)
The new sysfs path ioctl lets us get the /sys/fs/ path for a given
filesystem in a fs agnostic way, potentially nudging us towards
standarizing some of our reporting.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: linux-ext4@vger.kernel.org
Link: https://lore.kernel.org/r/20240315035308.3563511-4-kent.overstreet@linux.dev
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/super.c

index 28cbe0f1996f8eb47594a6dafd5cf174c02072a6..9bde300b155135644ba6d08a27542a27de47d047 100644 (file)
@@ -5340,6 +5340,7 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
        sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP | QTYPE_MASK_PRJ;
 #endif
        super_set_uuid(sb, es->s_uuid, sizeof(es->s_uuid));
+       super_set_sysfs_name_bdev(sb);
 
        INIT_LIST_HEAD(&sbi->s_orphan); /* unlinked but open files */
        mutex_init(&sbi->s_orphan_lock);