From dde9588853b1bde542eab247f8838c472806688f Mon Sep 17 00:00:00 2001 From: Dmitry Monakhov Date: Mon, 26 Apr 2010 20:03:33 +0400 Subject: quota: Make quota stat accounting lockless. Quota stats is mostly writable data structure. Let's alloc percpu bucket for each value. NOTE: dqstats_read() function is racy against dqstats_{inc,dec} and may return inconsistent value. But this is ok since absolute accuracy is not required. Signed-off-by: Dmitry Monakhov Signed-off-by: Jan Kara --- fs/quota/quota_v1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/quota/quota_v1.c') diff --git a/fs/quota/quota_v1.c b/fs/quota/quota_v1.c index 2ae757e9c00..4af344c5852 100644 --- a/fs/quota/quota_v1.c +++ b/fs/quota/quota_v1.c @@ -71,7 +71,7 @@ static int v1_read_dqblk(struct dquot *dquot) dquot->dq_dqb.dqb_ihardlimit == 0 && dquot->dq_dqb.dqb_isoftlimit == 0) set_bit(DQ_FAKE_B, &dquot->dq_flags); - dqstats.reads++; + dqstats_inc(DQST_READS); return 0; } @@ -104,7 +104,7 @@ static int v1_commit_dqblk(struct dquot *dquot) ret = 0; out: - dqstats.writes++; + dqstats_inc(DQST_WRITES); return ret; } -- cgit v1.2.3-70-g09d2