X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fmgs%2Flproc_mgs.c;h=d3434bf4daad288d5ae291ccefaeb9df85d67086;hb=feb80fe0c440f7790cc3afa53d048370374a81b1;hp=1457ce624edfc98273abfa8ec709b07f17975121;hpb=70e80ade90af09300396706b8910e196a7928520;p=fs%2Flustre-release.git diff --git a/lustre/mgs/lproc_mgs.c b/lustre/mgs/lproc_mgs.c index 1457ce6..d3434bf 100644 --- a/lustre/mgs/lproc_mgs.c +++ b/lustre/mgs/lproc_mgs.c @@ -16,8 +16,8 @@ * in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see [sun.com URL with a - * copy of GPLv2]. + * version 2 along with this program; If not, see + * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or @@ -121,7 +121,7 @@ int lproc_mgs_cleanup(struct obd_device *obd) struct mgs_obd *mgs; if (!obd) - RETURN(-EINVAL); + return -EINVAL; mgs = &obd->u.mgs; if (mgs->mgs_proc_live) { @@ -130,6 +130,7 @@ int lproc_mgs_cleanup(struct obd_device *obd) lprocfs_remove(&mgs->mgs_proc_live); mgs->mgs_proc_live = NULL; } + lprocfs_free_per_client_stats(obd); lprocfs_free_obd_stats(obd); return lprocfs_obd_cleanup(obd); @@ -165,22 +166,22 @@ static void seq_show_srpc_rule(struct seq_file *seq, const char *tgtname, } } -static int mgs_live_seq_show(struct seq_file *seq, void *v) +static int mgs_live_seq_show(struct seq_file *seq, void *v) { struct fs_db *fsdb = seq->private; struct mgs_tgt_srpc_conf *srpc_tgt; int i; - + down(&fsdb->fsdb_sem); seq_printf(seq, "fsname: %s\n", fsdb->fsdb_name); - seq_printf(seq, "flags: %#x gen: %d\n", + seq_printf(seq, "flags: %#x gen: %d\n", fsdb->fsdb_flags, fsdb->fsdb_gen); for (i = 0; i < INDEX_MAP_SIZE * 8; i++) - if (test_bit(i, fsdb->fsdb_mdt_index_map)) + if (test_bit(i, fsdb->fsdb_mdt_index_map)) seq_printf(seq, "%s-MDT%04x\n", fsdb->fsdb_name, i); for (i = 0; i < INDEX_MAP_SIZE * 8; i++) - if (test_bit(i, fsdb->fsdb_ost_index_map)) + if (test_bit(i, fsdb->fsdb_ost_index_map)) seq_printf(seq, "%s-OST%04x\n", fsdb->fsdb_name, i); seq_printf(seq, "\nSecure RPC Config Rules:\n"); @@ -206,9 +207,9 @@ int lproc_mgs_add_live(struct obd_device *obd, struct fs_db *fsdb) struct mgs_obd *mgs = &obd->u.mgs; int rc; - if (!mgs->mgs_proc_live) + if (!mgs->mgs_proc_live) return 0; - rc = lprocfs_seq_create(mgs->mgs_proc_live, fsdb->fsdb_name, 0444, + rc = lprocfs_seq_create(mgs->mgs_proc_live, fsdb->fsdb_name, 0444, &mgs_live_fops, fsdb); return 0; @@ -218,7 +219,7 @@ int lproc_mgs_del_live(struct obd_device *obd, struct fs_db *fsdb) { struct mgs_obd *mgs = &obd->u.mgs; - if (!mgs->mgs_proc_live) + if (!mgs->mgs_proc_live) return 0; lprocfs_remove_proc_entry(fsdb->fsdb_name, mgs->mgs_proc_live); @@ -230,6 +231,7 @@ struct lprocfs_vars lprocfs_mgs_obd_vars[] = { { "fstype", lprocfs_rd_fstype, 0, 0 }, { "mntdev", lprocfs_mgs_rd_mntdev, 0, 0 }, { "num_exports", lprocfs_rd_num_exports, 0, 0 }, + { "hash_stats", lprocfs_obd_rd_hash, 0, 0 }, { "evict_client", 0, lprocfs_wr_evict_client, 0 }, { 0 } };