mdt_counter_incr() should act upon obd->md_stats instead of
obd->obd_stats, the former is for recording md ops, while
the later for obd ops.
o=bobijam
i=andreas
i=liuying
"clear", lprocfs_nid_stats_clear_read,
lprocfs_nid_stats_clear_write, obd, NULL);
rc = lprocfs_alloc_md_stats(obd, LPROC_MDT_LAST);
"clear", lprocfs_nid_stats_clear_read,
lprocfs_nid_stats_clear_write, obd, NULL);
rc = lprocfs_alloc_md_stats(obd, LPROC_MDT_LAST);
+ if (rc == 0)
+ mdt_stats_counter_init(obd->md_stats);
void mdt_counter_incr(struct obd_export *exp, int opcode)
{
void mdt_counter_incr(struct obd_export *exp, int opcode)
{
- if (exp->exp_obd && exp->exp_obd->obd_stats)
- lprocfs_counter_incr(exp->exp_obd->obd_stats, opcode);
+ if (exp->exp_obd && exp->exp_obd->md_stats)
+ lprocfs_counter_incr(exp->exp_obd->md_stats, opcode);
if (exp->exp_nid_stats && exp->exp_nid_stats->nid_stats != NULL)
lprocfs_counter_incr(exp->exp_nid_stats->nid_stats, opcode);
if (exp->exp_nid_stats && exp->exp_nid_stats->nid_stats != NULL)
lprocfs_counter_incr(exp->exp_nid_stats->nid_stats, opcode);