diff options
author | Dmitry Monakhov <dmonakhov@openvz.org> | 2010-04-26 12:03:33 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2010-05-21 13:30:41 -0400 |
commit | dde9588853b1bde542eab247f8838c472806688f (patch) | |
tree | 9f9c68bf63120056517bbfce78b75e6820cc4c4b /fs/quota/quota_tree.c | |
parent | da8d1ba22fa1fd0c0e541a43d75ebb062589b14b (diff) |
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 <dmonakhov@openvz.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/quota/quota_tree.c')
-rw-r--r-- | fs/quota/quota_tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/quota/quota_tree.c b/fs/quota/quota_tree.c index f81f4bcfb178..5b7f7416ec7a 100644 --- a/fs/quota/quota_tree.c +++ b/fs/quota/quota_tree.c | |||
@@ -384,7 +384,7 @@ int qtree_write_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot) | |||
384 | } else { | 384 | } else { |
385 | ret = 0; | 385 | ret = 0; |
386 | } | 386 | } |
387 | dqstats.writes++; | 387 | dqstats_inc(DQST_WRITES); |
388 | kfree(ddquot); | 388 | kfree(ddquot); |
389 | 389 | ||
390 | return ret; | 390 | return ret; |
@@ -634,7 +634,7 @@ int qtree_read_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot) | |||
634 | spin_unlock(&dq_data_lock); | 634 | spin_unlock(&dq_data_lock); |
635 | kfree(ddquot); | 635 | kfree(ddquot); |
636 | out: | 636 | out: |
637 | dqstats.reads++; | 637 | dqstats_inc(DQST_READS); |
638 | return ret; | 638 | return ret; |
639 | } | 639 | } |
640 | EXPORT_SYMBOL(qtree_read_dquot); | 640 | EXPORT_SYMBOL(qtree_read_dquot); |