summaryrefslogtreecommitdiff
path: root/fs/gfs2/main.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2013-12-12 10:47:59 +0000
committerSteven Whitehouse <swhiteho@redhat.com>2014-01-14 19:27:56 +0000
commitc754fbbb1b6bf462c6ddba48b19f20adf2335cac (patch)
tree4d716f692b1366d77067e9fea74f6a5a9dbe61b8 /fs/gfs2/main.c
parent086352f1aa8d717eaf565074d6634c7bdd26aca0 (diff)
GFS2: Use RCU/hlist_bl based hash for quotas
Prior to this patch, GFS2 kept all the quotas for each super block in a single linked list. This is rather slow when there are large numbers of quotas. This patch introduces a hlist_bl based hash table, similar to the one used for glocks. The initial look up of the quota is now lockless in the case where it is already cached, although we still have to take the per quota spinlock in order to bump the ref count. Either way though, this is a big improvement on what was there before. The qd_lock and the per super block list is preserved, for the time being. However it is intended that since this is no longer used for its original role, it should be possible to shrink the number of items on that list in due course and remove the requirement to take qd_lock in qd_get. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Cc: Abhijith Das <adas@redhat.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'fs/gfs2/main.c')
-rw-r--r--fs/gfs2/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c
index 0650db2541ef..c272e73063de 100644
--- a/fs/gfs2/main.c
+++ b/fs/gfs2/main.c
@@ -76,6 +76,7 @@ static int __init init_gfs2_fs(void)
gfs2_str2qstr(&gfs2_qdot, ".");
gfs2_str2qstr(&gfs2_qdotdot, "..");
+ gfs2_quota_hash_init();
error = gfs2_sys_init();
if (error)