staging/lustre/llite: move /proc/fs/lustre/llite/uuid to sysfs
Move uuid file from /proc/fs/lustre/llite/* to /sys/fs/lustre/llite/*/ Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>hifive-unleashed-5.1
parent
0cee667682
commit
ec55a62999
|
@ -198,15 +198,15 @@ static ssize_t fstype_show(struct kobject *kobj, struct attribute *attr,
|
||||||
}
|
}
|
||||||
LUSTRE_RO_ATTR(fstype);
|
LUSTRE_RO_ATTR(fstype);
|
||||||
|
|
||||||
static int ll_sb_uuid_seq_show(struct seq_file *m, void *v)
|
static ssize_t uuid_show(struct kobject *kobj, struct attribute *attr,
|
||||||
|
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);
|
return sprintf(buf, "%s\n", sbi->ll_sb_uuid.uuid);
|
||||||
seq_printf(m, "%s\n", ll_s2sbi(sb)->ll_sb_uuid.uuid);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
LPROC_SEQ_FOPS_RO(ll_sb_uuid);
|
LUSTRE_RO_ATTR(uuid);
|
||||||
|
|
||||||
static int ll_site_stats_seq_show(struct seq_file *m, void *v)
|
static int ll_site_stats_seq_show(struct seq_file *m, void *v)
|
||||||
{
|
{
|
||||||
|
@ -837,7 +837,6 @@ static ssize_t ll_xattr_cache_seq_write(struct file *file,
|
||||||
LPROC_SEQ_FOPS(ll_xattr_cache);
|
LPROC_SEQ_FOPS(ll_xattr_cache);
|
||||||
|
|
||||||
static struct lprocfs_vars lprocfs_llite_obd_vars[] = {
|
static struct lprocfs_vars lprocfs_llite_obd_vars[] = {
|
||||||
{ "uuid", &ll_sb_uuid_fops, NULL, 0 },
|
|
||||||
/* { "mntpt_path", ll_rd_path, 0, 0 }, */
|
/* { "mntpt_path", ll_rd_path, 0, 0 }, */
|
||||||
{ "site", &ll_site_stats_fops, NULL, 0 },
|
{ "site", &ll_site_stats_fops, NULL, 0 },
|
||||||
/* { "filegroups", lprocfs_rd_filegroups, 0, 0 }, */
|
/* { "filegroups", lprocfs_rd_filegroups, 0, 0 }, */
|
||||||
|
@ -875,6 +874,7 @@ static struct attribute *llite_attrs[] = {
|
||||||
&lustre_attr_filesfree.attr,
|
&lustre_attr_filesfree.attr,
|
||||||
&lustre_attr_client_type.attr,
|
&lustre_attr_client_type.attr,
|
||||||
&lustre_attr_fstype.attr,
|
&lustre_attr_fstype.attr,
|
||||||
|
&lustre_attr_uuid.attr,
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -91,3 +91,9 @@ Date: May 2015
|
||||||
Contact: "Oleg Drokin" <oleg.drokin@intel.com>
|
Contact: "Oleg Drokin" <oleg.drokin@intel.com>
|
||||||
Description:
|
Description:
|
||||||
Shows filesystem type of the filesystem
|
Shows filesystem type of the filesystem
|
||||||
|
|
||||||
|
What: /sys/fs/lustre/llite/<fsname>-<uuid>/uuid
|
||||||
|
Date: May 2015
|
||||||
|
Contact: "Oleg Drokin" <oleg.drokin@intel.com>
|
||||||
|
Description:
|
||||||
|
Shows this filesystem superblock uuid
|
||||||
|
|
Loading…
Reference in New Issue