}
static inline int obd_quota_adjust_qunit(struct obd_export *exp,
- struct quota_adjust_qunit *oqaq)
+ struct quota_adjust_qunit *oqaq,
+ struct lustre_quota_ctxt *qctxt)
{
+#ifdef LPROCFS
+ struct timeval work_start;
+ struct timeval work_end;
+ long timediff;
+#endif
int rc;
ENTRY;
+#ifdef LPROCFS
+ if (qctxt)
+ do_gettimeofday(&work_start);
+#endif
EXP_CHECK_OP(exp, quota_adjust_qunit);
EXP_COUNTER_INCREMENT(exp, quota_adjust_qunit);
- rc = OBP(exp->exp_obd, quota_adjust_qunit)(exp, oqaq);
+ rc = OBP(exp->exp_obd, quota_adjust_qunit)(exp, oqaq, qctxt);
+
+#ifdef LPROCFS
+ if (qctxt) {
+ do_gettimeofday(&work_end);
+ timediff = cfs_timeval_sub(&work_end, &work_start, NULL);
+ lprocfs_counter_add(qctxt->lqc_stats, LQUOTA_ADJUST_QUNIT,
+ timediff);
+ }
+#endif
RETURN(rc);
}