aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/rgrp.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2011-09-02 11:08:09 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2011-10-21 07:39:39 -0400
commit70b0c3656f12964a6dac104214c904c66e626058 (patch)
treef58b4b67d6343d5b48c6335fb93ccbe6ed61e1c0 /fs/gfs2/rgrp.h
parentd56fa8a1c17b68274349fc852f634af99c0c4671 (diff)
GFS2: Use cached rgrp in gfs2_rlist_add()
Each block which is deallocated, requires a call to gfs2_rlist_add() and each of those calls was calling gfs2_blk2rgrpd() in order to figure out which rgrp the block belonged in. This can be speeded up by making use of the rgrp cached in the inode. We also reset this cached rgrp in case the block has changed rgrp. This should provide a big reduction in gfs2_blk2rgrpd() calls during deallocation. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/rgrp.h')
-rw-r--r--fs/gfs2/rgrp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/rgrp.h b/fs/gfs2/rgrp.h
index 0439fca18f08..0e886d830784 100644
--- a/fs/gfs2/rgrp.h
+++ b/fs/gfs2/rgrp.h
@@ -60,7 +60,7 @@ struct gfs2_rgrp_list {
60 struct gfs2_holder *rl_ghs; 60 struct gfs2_holder *rl_ghs;
61}; 61};
62 62
63extern void gfs2_rlist_add(struct gfs2_sbd *sdp, struct gfs2_rgrp_list *rlist, 63extern void gfs2_rlist_add(struct gfs2_inode *ip, struct gfs2_rgrp_list *rlist,
64 u64 block); 64 u64 block);
65extern void gfs2_rlist_alloc(struct gfs2_rgrp_list *rlist, unsigned int state); 65extern void gfs2_rlist_alloc(struct gfs2_rgrp_list *rlist, unsigned int state);
66extern void gfs2_rlist_free(struct gfs2_rgrp_list *rlist); 66extern void gfs2_rlist_free(struct gfs2_rgrp_list *rlist);