diff options
author | Christoph Hellwig <hch@infradead.org> | 2012-03-13 08:52:33 (GMT) |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-03-14 16:09:06 (GMT) |
commit | 48776fd22344ad80adcbac0abc9c0da60c6481d2 (patch) | |
tree | 8ab09fce19aab58e0e451d16c98ff7d1e84dcc53 /fs/xfs/xfs_qm.c | |
parent | 8f639ddea0c4978ae9b4e46ea041c9e5afe0ee8d (diff) | |
download | linux-48776fd22344ad80adcbac0abc9c0da60c6481d2.tar.xz |
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 <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_qm.c')
-rw-r--r-- | fs/xfs/xfs_qm.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c index c872fea..0dde1f4 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 |