* [PATCH -next v2] zonefs: add support for FS_IOC_GETFSSYSFSPATH
@ 2024-08-20 2:20 Liao Chen
2024-08-20 8:49 ` Damien Le Moal
0 siblings, 1 reply; 2+ messages in thread
From: Liao Chen @ 2024-08-20 2:20 UTC (permalink / raw)
To: linux-fsdevel; +Cc: linux-kernel, dlemoal, naohiro.aota, jth
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>".
Signed-off-by: Liao Chen <liaochen4@huawei.com>
---
fs/zonefs/sysfs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/zonefs/sysfs.c b/fs/zonefs/sysfs.c
index 8ccb65c2b419..ff9a688f1f9c 100644
--- a/fs/zonefs/sysfs.c
+++ b/fs/zonefs/sysfs.c
@@ -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);
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next v2] zonefs: add support for FS_IOC_GETFSSYSFSPATH
2024-08-20 2:20 [PATCH -next v2] zonefs: add support for FS_IOC_GETFSSYSFSPATH Liao Chen
@ 2024-08-20 8:49 ` Damien Le Moal
0 siblings, 0 replies; 2+ messages in thread
From: Damien Le Moal @ 2024-08-20 8:49 UTC (permalink / raw)
To: Liao Chen, linux-fsdevel; +Cc: linux-kernel, naohiro.aota, jth
On 8/20/24 11:20, Liao Chen wrote:
> 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>".
>
> Signed-off-by: Liao Chen <liaochen4@huawei.com>
Applied to for-6.12. Thanks !
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-20 8:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-20 2:20 [PATCH -next v2] zonefs: add support for FS_IOC_GETFSSYSFSPATH Liao Chen
2024-08-20 8:49 ` Damien Le Moal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox