From: bobijam Date: Wed, 10 Sep 2008 03:11:00 +0000 (+0000) Subject: Branch b1_6 X-Git-Tag: GIT_EPOCH_B_RELEASE_1_6_7~2^3~251 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=fff258b565af10576f2f8c6158b0555a9b182e42;p=fs%2Flustre-release.git Branch b1_6 b=17023 o=adilger i=zhenyu.xu (bobijam) i=johann increment correct per-nid stats counter. --- diff --git a/lustre/obdfilter/lproc_obdfilter.c b/lustre/obdfilter/lproc_obdfilter.c index 4f8c7da..700323f 100644 --- a/lustre/obdfilter/lproc_obdfilter.c +++ b/lustre/obdfilter/lproc_obdfilter.c @@ -258,8 +258,8 @@ void filter_tally(struct obd_export *exp, struct page **pages, int nr_pages, lprocfs_oh_tally_log2(&fed->fed_brw_stats.hist[BRW_R_PAGES + wr], nr_pages); if (exp->exp_nid_stats && exp->exp_nid_stats->nid_brw_stats) - lprocfs_oh_tally_log2(&exp->exp_nid_stats->nid_brw_stats->hist[BRW_W_PAGES + wr], - nr_pages); + lprocfs_oh_tally_log2(&exp->exp_nid_stats->nid_brw_stats-> + hist[BRW_R_PAGES + wr], nr_pages); while (nr_pages-- > 0) { if (last_page && (*pages)->index != (last_page->index + 1)) @@ -283,9 +283,11 @@ void filter_tally(struct obd_export *exp, struct page **pages, int nr_pages, discont_blocks); if (exp->exp_nid_stats && exp->exp_nid_stats->nid_brw_stats) { - lprocfs_oh_tally_log2(&exp->exp_nid_stats->nid_brw_stats->hist[BRW_W_DISCONT_PAGES + wr], + lprocfs_oh_tally_log2(&exp->exp_nid_stats->nid_brw_stats-> + hist[BRW_R_DISCONT_PAGES + wr], discont_pages); - lprocfs_oh_tally_log2(&exp->exp_nid_stats->nid_brw_stats->hist[BRW_W_DISCONT_BLOCKS + wr], + lprocfs_oh_tally_log2(&exp->exp_nid_stats->nid_brw_stats-> + hist[BRW_R_DISCONT_BLOCKS + wr], discont_blocks); } } @@ -299,7 +301,7 @@ static void display_brw_stats(struct seq_file *seq, char *name, char *units, int i; seq_printf(seq, "\n%26s read | write\n", " "); - seq_printf(seq, "%-22s %-5s %% cum %% | %-5s %% cum %%\n", + seq_printf(seq, "%-22s %-5s %% cum %% | %-5s %% cum %%\n", name, units, units); read_tot = lprocfs_oh_sum(read); @@ -312,7 +314,7 @@ static void display_brw_stats(struct seq_file *seq, char *name, char *units, if (read_cum == 0 && write_cum == 0) continue; - if (!log2) + if (!log2) seq_printf(seq, "%u", i); else if (i < 10) seq_printf(seq, "%u", 1<