+int lproc_mgs_add_live(struct mgs_device *mgs, struct fs_db *fsdb)
+{
+ int rc;
+
+ if (!mgs->mgs_proc_live)
+ return 0;
+ rc = lprocfs_seq_create(mgs->mgs_proc_live, fsdb->fsdb_name, 0644,
+ &mgs_live_fops, fsdb);
+
+ return 0;
+}
+
+int lproc_mgs_del_live(struct mgs_device *mgs, struct fs_db *fsdb)
+{
+ if (!mgs->mgs_proc_live)
+ return 0;
+
+ /* didn't create the proc file for MGSSELF_NAME */
+ if (!test_bit(FSDB_MGS_SELF, &fsdb->fsdb_flags))
+ lprocfs_remove_proc_entry(fsdb->fsdb_name, mgs->mgs_proc_live);
+ return 0;
+}
+
+LPROC_SEQ_FOPS_RO_TYPE(mgs, uuid);
+LPROC_SEQ_FOPS_RO_TYPE(mgs, num_exports);
+LPROC_SEQ_FOPS_RO_TYPE(mgs, hash);
+LPROC_SEQ_FOPS_WO_TYPE(mgs, evict_client);
+LPROC_SEQ_FOPS_RW_TYPE(mgs, ir_timeout);
+
+static struct lprocfs_vars lprocfs_mgs_obd_vars[] = {
+ { .name = "uuid",
+ .fops = &mgs_uuid_fops },
+ { .name = "num_exports",
+ .fops = &mgs_num_exports_fops },
+ { .name = "hash_stats",
+ .fops = &mgs_hash_fops },
+ { .name = "evict_client",
+ .fops = &mgs_evict_client_fops },
+ { .name = "ir_timeout",
+ .fops = &mgs_ir_timeout_fops },
+ { NULL }
+};
+
+int lproc_mgs_setup(struct mgs_device *mgs, const char *osd_name)