Skip to contentSkip to conversation

zonefs: add support for FS_IOC_GETFSSYSFSPATH

PATCH Applied Liao Chen 2 participants 2 messages Aug 20, 2024

Subsystems (2)
lore
Share & tools
lore

Liao Chen

author
#0 lore raw

PATCH v2 1/1 zonefs: add support for FS_IOC_GETFSSYSFSPATH

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 zonefs, it will output "zonefs/<dev>".

---
 fs/zonefs/sysfs.c | 1 +
 1 file changed, 1 insertion(+)
fs/zonefs/sysfs.c +1 -0
index 8ccb65c2b419..ff9a688f1f9c 100644
@@ -92,6 +92,7 @@ int zonefs_sysfs_register(struct super_block *sb)
 	struct zonefs_sb_info *sbi = ZONEFS_SB(sb);
 	int ret;
 
+	super_set_sysfs_name_id(sb);
 	init_completion(&sbi->s_kobj_unregister);
 	ret = kobject_init_and_add(&sbi->s_kobj, &zonefs_sb_ktype,
 				   zonefs_sysfs_root, "%s", sb->s_id);
Signature · 1 line
2.34.1
maintainer Applied
#1 lore raw
Quoted 8 lines · Liao Chen

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 zonefs, it will output "zonefs/<dev>".

Applied to for-6.12. Thanks !

Signature · 2 lines
Damien Le Moal
Western Digital Research