[PATCH 08/25] staging/lustre/llite: move /proc/fs/lustre/llite/fstype to sysfs
green at linuxhacker.ru
green at linuxhacker.ru
Sat May 16 07:31:00 UTC 2015
From: Oleg Drokin <green at linuxhacker.ru>
Move fstype file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/
Signed-off-by: Oleg Drokin <green at linuxhacker.ru>
---
drivers/staging/lustre/lustre/llite/lproc_llite.c | 13 ++++++-------
drivers/staging/lustre/sysfs-fs-lustre | 6 ++++++
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c
index 177f2c2..7e2e3a0 100644
--- a/drivers/staging/lustre/lustre/llite/lproc_llite.c
+++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c
@@ -181,15 +181,14 @@ static ssize_t client_type_show(struct kobject *kobj, char *buf)
}
LUSTRE_RO_ATTR(client_type);
-static int ll_fstype_seq_show(struct seq_file *m, void *v)
+static ssize_t fstype_show(struct kobject *kobj, char *buf)
{
- struct super_block *sb = (struct super_block *)m->private;
+ struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info,
+ ll_kobj);
- LASSERT(sb != NULL);
- seq_printf(m, "%s\n", sb->s_type->name);
- return 0;
+ return sprintf(buf, "%s\n", sbi->ll_sb->s_type->name);
}
-LPROC_SEQ_FOPS_RO(ll_fstype);
+LUSTRE_RO_ATTR(fstype);
static int ll_sb_uuid_seq_show(struct seq_file *m, void *v)
{
@@ -832,7 +831,6 @@ LPROC_SEQ_FOPS(ll_xattr_cache);
static struct lprocfs_vars lprocfs_llite_obd_vars[] = {
{ "uuid", &ll_sb_uuid_fops, NULL, 0 },
/* { "mntpt_path", ll_rd_path, 0, 0 }, */
- { "fstype", &ll_fstype_fops, NULL, 0 },
{ "site", &ll_site_stats_fops, NULL, 0 },
/* { "filegroups", lprocfs_rd_filegroups, 0, 0 }, */
{ "max_read_ahead_mb", &ll_max_readahead_mb_fops, NULL },
@@ -868,6 +866,7 @@ static struct attribute *llite_attrs[] = {
&lustre_attr_filestotal.attr,
&lustre_attr_filesfree.attr,
&lustre_attr_client_type.attr,
+ &lustre_attr_fstype.attr,
NULL,
};
diff --git a/drivers/staging/lustre/sysfs-fs-lustre b/drivers/staging/lustre/sysfs-fs-lustre
index 213eb86..36c20d8 100644
--- a/drivers/staging/lustre/sysfs-fs-lustre
+++ b/drivers/staging/lustre/sysfs-fs-lustre
@@ -85,3 +85,9 @@ Description:
Shows whenever this filesystem considers this client to be
compute cluster-local or remote. Remote clients have
additional uid/gid convrting logic applied.
+
+What: /sys/fs/lustre/llite/<fsname>-<uuid>/fstype
+Date: May 2015
+Contact: "Oleg Drokin" <oleg.drokin at intel.com>
+Description:
+ Shows filesystem type of the filesystem
--
2.1.0
More information about the devel
mailing list