diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2011-09-02 11:08:09 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2011-10-21 07:39:39 -0400 |
commit | 70b0c3656f12964a6dac104214c904c66e626058 (patch) | |
tree | f58b4b67d6343d5b48c6335fb93ccbe6ed61e1c0 /fs/gfs2/bmap.c | |
parent | d56fa8a1c17b68274349fc852f634af99c0c4671 (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/bmap.c')
-rw-r--r-- | fs/gfs2/bmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 9d3a0c26df28..22ad413213ca 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c | |||
@@ -724,7 +724,7 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh, | |||
724 | blen++; | 724 | blen++; |
725 | else { | 725 | else { |
726 | if (bstart) | 726 | if (bstart) |
727 | gfs2_rlist_add(sdp, &rlist, bstart); | 727 | gfs2_rlist_add(ip, &rlist, bstart); |
728 | 728 | ||
729 | bstart = bn; | 729 | bstart = bn; |
730 | blen = 1; | 730 | blen = 1; |
@@ -732,7 +732,7 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh, | |||
732 | } | 732 | } |
733 | 733 | ||
734 | if (bstart) | 734 | if (bstart) |
735 | gfs2_rlist_add(sdp, &rlist, bstart); | 735 | gfs2_rlist_add(ip, &rlist, bstart); |
736 | else | 736 | else |
737 | goto out; /* Nothing to do */ | 737 | goto out; /* Nothing to do */ |
738 | 738 | ||