aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/dir.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2011-08-31 11:38:29 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2011-10-21 07:39:33 -0400
commit8339ee543ece6e2dcc1bbd97d5350163c198cf00 (patch)
tree80b3d4b990a8ab5f8b7c28945f694b01301c05c6 /fs/gfs2/dir.c
parent7c9ca621137cde26be05448133fc1a554345f4f8 (diff)
GFS2: Make resource groups "append only" during life of fs
Since we have ruled out supporting online filesystem shrink, it is possible to make the resource group list append only during the life of a super block. This gives several benefits: Firstly, we only need to read new rindex elements as they are added rather than needing to reread the whole rindex file each time one element is added. Secondly, the rindex glock can be held for much shorter periods of time, and is completely removed from the fast path for allocations. The lock is taken in shared mode only when updating the resource groups when the first allocation occurs, and after a grow has taken place. Thirdly, this results in a reduction in code size, and everything gets a lot simpler to understand in this area. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r--fs/gfs2/dir.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index 898e62ed5b85..90b877b464ca 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -1807,10 +1807,6 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len,
1807 if (error) 1807 if (error)
1808 goto out_put; 1808 goto out_put;
1809 1809
1810 error = gfs2_rindex_hold(sdp, &dip->i_alloc->al_ri_gh);
1811 if (error)
1812 goto out_qs;
1813
1814 /* Count the number of leaves */ 1810 /* Count the number of leaves */
1815 bh = leaf_bh; 1811 bh = leaf_bh;
1816 1812
@@ -1889,8 +1885,6 @@ out_rg_gunlock:
1889 gfs2_glock_dq_m(rlist.rl_rgrps, rlist.rl_ghs); 1885 gfs2_glock_dq_m(rlist.rl_rgrps, rlist.rl_ghs);
1890out_rlist: 1886out_rlist:
1891 gfs2_rlist_free(&rlist); 1887 gfs2_rlist_free(&rlist);
1892 gfs2_glock_dq_uninit(&dip->i_alloc->al_ri_gh);
1893out_qs:
1894 gfs2_quota_unhold(dip); 1888 gfs2_quota_unhold(dip);
1895out_put: 1889out_put:
1896 gfs2_alloc_put(dip); 1890 gfs2_alloc_put(dip);