From 48776fd22344ad80adcbac0abc9c0da60c6481d2 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 13 Mar 2012 08:52:33 +0000 Subject: xfs: use common code for quota statistics Switch the quota code over to use the generic XFS statistics infrastructure. While the legacy /proc/fs/xfs/xqm and /proc/fs/xfs/xqmstats interfaces are preserved for now the statistics that still have a meaning with the current code are now also available from /proc/fs/xfs/stats. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Ben Myers --- fs/xfs/xfs_qm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'fs/xfs/xfs_qm.c') diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c index c872feaf3697..0dde1f48c280 100644 --- a/fs/xfs/xfs_qm.c +++ b/fs/xfs/xfs_qm.c @@ -134,7 +134,6 @@ xfs_Gqm_init(void) } else xqm->qm_dqtrxzone = qm_dqtrxzone; - atomic_set(&xqm->qm_totaldquots, 0); xqm->qm_nrefs = 0; return xqm; @@ -1637,10 +1636,11 @@ xfs_qm_dqreclaim_one( xfs_dqunlock(dqp); trace_xfs_dqreclaim_want(dqp); - XQM_STATS_INC(xqmstats.xs_qm_dqwants); + XFS_STATS_INC(xs_qm_dqwants); list_del_init(&dqp->q_freelist); xfs_Gqm->qm_dqfrlist_cnt--; + XFS_STATS_DEC(xs_qm_dquot_unused); return; } @@ -1690,9 +1690,10 @@ xfs_qm_dqreclaim_one( ASSERT(dqp->q_nrefs == 0); list_move_tail(&dqp->q_freelist, dispose_list); xfs_Gqm->qm_dqfrlist_cnt--; + XFS_STATS_DEC(xs_qm_dquot_unused); trace_xfs_dqreclaim_done(dqp); - XQM_STATS_INC(xqmstats.xs_qm_dqreclaims); + XFS_STATS_INC(xs_qm_dqreclaims); return; out_busy: @@ -1704,7 +1705,7 @@ out_busy: list_move_tail(&dqp->q_freelist, &xfs_Gqm->qm_dqfrlist); trace_xfs_dqreclaim_busy(dqp); - XQM_STATS_INC(xqmstats.xs_qm_dqreclaim_misses); + XFS_STATS_INC(xs_qm_dqreclaim_misses); } STATIC int -- cgit v1.2.3