[PATCH -next] erofs: add support for FS_IOC_GETFSSYSFSPATH

Huang Xiaojia huangxiaojia2 at huawei.com
Mon Jun 24 16:38:01 AEST 2024


FS_IOC_GETFSSYSFSPATH ioctl exposes /sys/fs path of a given filesystem,
potentially standarizing sysfs reporting. This patch add support for
FS_IOC_GETFSSYSFSPATH for erofs, "erofs/<dev>" will be outpt.

Signed-off-by: Huang Xiaojia <huangxiaojia2 at huawei.com>
---
 fs/erofs/super.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index 1b91d9513013..19dfc1bd3666 100644
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@ -643,6 +643,7 @@ static int erofs_fc_fill_super(struct super_block *sb, struct fs_context *fc)
 		sb->s_flags |= SB_POSIXACL;
 	else
 		sb->s_flags &= ~SB_POSIXACL;
+	super_set_sysfs_name_bdev(sb);
 
 #ifdef CONFIG_EROFS_FS_ZIP
 	xa_init(&sbi->managed_pslots);
-- 
2.34.1



More information about the Linux-erofs mailing list