Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0bc36cb0 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman
Browse files

staging/lustre/obdclass: Move common obd proc files to sysfs



This moves uuid display and also underlying fs statistics.

Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9b801302
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -633,7 +633,6 @@ extern int lprocfs_wr_atomic(struct file *file, const char __user *buffer,
extern int lprocfs_rd_uint(struct seq_file *m, void *data);
extern int lprocfs_wr_uint(struct file *file, const char __user *buffer,
			   unsigned long count, void *data);
extern int lprocfs_rd_uuid(struct seq_file *m, void *data);
extern int lprocfs_rd_name(struct seq_file *m, void *data);
extern int lprocfs_rd_server_uuid(struct seq_file *m, void *data);
extern int lprocfs_rd_conn_uuid(struct seq_file *m, void *data);
@@ -658,12 +657,6 @@ extern int lprocfs_wr_pinger_recov(struct file *file, const char __user *buffer,
				   size_t count, loff_t *off);

/* Statfs helpers */
extern int lprocfs_rd_blksize(struct seq_file *m, void *data);
extern int lprocfs_rd_kbytestotal(struct seq_file *m, void *data);
extern int lprocfs_rd_kbytesfree(struct seq_file *m, void *data);
extern int lprocfs_rd_kbytesavail(struct seq_file *m, void *data);
extern int lprocfs_rd_filestotal(struct seq_file *m, void *data);
extern int lprocfs_rd_filesfree(struct seq_file *m, void *data);

extern int lprocfs_write_helper(const char __user *buffer, unsigned long count,
				int *val);
+0 −3
Original line number Diff line number Diff line
@@ -204,13 +204,10 @@ static int lmv_target_seq_open(struct inode *inode, struct file *file)
	return 0;
}

LPROC_SEQ_FOPS_RO_TYPE(lmv, uuid);

static struct lprocfs_vars lprocfs_lmv_obd_vars[] = {
	{ "numobd",	  &lmv_numobd_fops,	  NULL, 0 },
	{ "placement",	  &lmv_placement_fops,    NULL, 0 },
	{ "activeobd",	  &lmv_activeobd_fops,    NULL, 0 },
	{ "uuid",	  &lmv_uuid_fops,	  NULL, 0 },
	{ "desc_uuid",	  &lmv_desc_uuid_fops,    NULL, 0 },
	{ NULL }
};
+0 −15
Original line number Diff line number Diff line
@@ -262,29 +262,14 @@ static int lov_target_seq_open(struct inode *inode, struct file *file)
	return 0;
}

LPROC_SEQ_FOPS_RO_TYPE(lov, uuid);
LPROC_SEQ_FOPS_RO_TYPE(lov, filestotal);
LPROC_SEQ_FOPS_RO_TYPE(lov, filesfree);
LPROC_SEQ_FOPS_RO_TYPE(lov, blksize);
LPROC_SEQ_FOPS_RO_TYPE(lov, kbytestotal);
LPROC_SEQ_FOPS_RO_TYPE(lov, kbytesfree);
LPROC_SEQ_FOPS_RO_TYPE(lov, kbytesavail);

static struct lprocfs_vars lprocfs_lov_obd_vars[] = {
	{ "uuid",	  &lov_uuid_fops,	  NULL, 0 },
	{ "stripesize",   &lov_stripesize_fops,   NULL },
	{ "stripeoffset", &lov_stripeoffset_fops, NULL },
	{ "stripecount",  &lov_stripecount_fops,  NULL },
	{ "stripetype",   &lov_stripetype_fops,   NULL },
	{ "numobd",       &lov_numobd_fops,	  NULL, 0 },
	{ "activeobd",    &lov_activeobd_fops,	  NULL, 0 },
	{ "filestotal",   &lov_filestotal_fops,   NULL, 0 },
	{ "filesfree",    &lov_filesfree_fops,    NULL, 0 },
	/*{ "filegroups", lprocfs_rd_filegroups,  NULL, 0 },*/
	{ "blocksize",    &lov_blksize_fops,      NULL, 0 },
	{ "kbytestotal",  &lov_kbytestotal_fops,  NULL, 0 },
	{ "kbytesfree",   &lov_kbytesfree_fops,   NULL, 0 },
	{ "kbytesavail",  &lov_kbytesavail_fops,  NULL, 0 },
	{ "desc_uuid",    &lov_desc_uuid_fops,    NULL, 0 },
	{ NULL }
};
+0 −14
Original line number Diff line number Diff line
@@ -155,14 +155,7 @@ static struct file_operations mdc_kuc_fops = {

LPROC_SEQ_FOPS_WR_ONLY(mdc, ping);

LPROC_SEQ_FOPS_RO_TYPE(mdc, uuid);
LPROC_SEQ_FOPS_RO_TYPE(mdc, connect_flags);
LPROC_SEQ_FOPS_RO_TYPE(mdc, blksize);
LPROC_SEQ_FOPS_RO_TYPE(mdc, kbytestotal);
LPROC_SEQ_FOPS_RO_TYPE(mdc, kbytesfree);
LPROC_SEQ_FOPS_RO_TYPE(mdc, kbytesavail);
LPROC_SEQ_FOPS_RO_TYPE(mdc, filestotal);
LPROC_SEQ_FOPS_RO_TYPE(mdc, filesfree);
LPROC_SEQ_FOPS_RO_TYPE(mdc, server_uuid);
LPROC_SEQ_FOPS_RO_TYPE(mdc, conn_uuid);
LPROC_SEQ_FOPS_RO_TYPE(mdc, timeouts);
@@ -178,15 +171,8 @@ LPROC_SEQ_FOPS_RW_TYPE(mdc, import);
LPROC_SEQ_FOPS_RW_TYPE(mdc, pinger_recov);

static struct lprocfs_vars lprocfs_mdc_obd_vars[] = {
	{ "uuid",		&mdc_uuid_fops,			NULL, 0 },
	{ "ping",		&mdc_ping_fops,			NULL, 0222 },
	{ "connect_flags",	&mdc_connect_flags_fops,	NULL, 0 },
	{ "blocksize",		&mdc_blksize_fops,		NULL, 0 },
	{ "kbytestotal",	&mdc_kbytestotal_fops,		NULL, 0 },
	{ "kbytesfree",		&mdc_kbytesfree_fops,		NULL, 0 },
	{ "kbytesavail",	&mdc_kbytesavail_fops,		NULL, 0 },
	{ "filestotal",		&mdc_filestotal_fops,		NULL, 0 },
	{ "filesfree",		&mdc_filesfree_fops,		NULL, 0 },
	/*{ "filegroups",	lprocfs_rd_filegroups,		NULL, 0 },*/
	{ "mds_server_uuid",	&mdc_server_uuid_fops,		NULL, 0 },
	{ "mds_conn_uuid",	&mdc_conn_uuid_fops,		NULL, 0 },
+0 −2
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@
#include "../include/lprocfs_status.h"
#include "mgc_internal.h"

LPROC_SEQ_FOPS_RO_TYPE(mgc, uuid);
LPROC_SEQ_FOPS_RO_TYPE(mgc, connect_flags);
LPROC_SEQ_FOPS_RO_TYPE(mgc, server_uuid);
LPROC_SEQ_FOPS_RO_TYPE(mgc, conn_uuid);
@@ -56,7 +55,6 @@ static int mgc_ir_state_seq_show(struct seq_file *m, void *v)
LPROC_SEQ_FOPS_RO(mgc_ir_state);

static struct lprocfs_vars lprocfs_mgc_obd_vars[] = {
	{ "uuid",	     &mgc_uuid_fops,	  NULL, 0 },
	{ "ping",	     &mgc_ping_fops,      NULL, 0222 },
	{ "connect_flags",   &mgc_connect_flags_fops, NULL, 0 },
	{ "mgs_server_uuid", &mgc_server_uuid_fops,   NULL, 0 },
Loading