summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/xattr.c
diff options
context:
space:
mode:
authorSteven Whitehouse2011-09-02 17:08:09 +0200
committerSteven Whitehouse2011-10-21 13:39:39 +0200
commit70b0c3656f12964a6dac104214c904c66e626058 (patch)
treef58b4b67d6343d5b48c6335fb93ccbe6ed61e1c0 /fs/gfs2/xattr.c
parentGFS2: Call do_strip() directly from recursive_scan() (diff)
downloadkernel-qcow2-linux-70b0c3656f12964a6dac104214c904c66e626058.tar.gz
kernel-qcow2-linux-70b0c3656f12964a6dac104214c904c66e626058.tar.xz
kernel-qcow2-linux-70b0c3656f12964a6dac104214c904c66e626058.zip
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/xattr.c')
-rw-r--r--fs/gfs2/xattr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/xattr.c b/fs/gfs2/xattr.c
index e7bf0ea1c3cc..71d7bf830c09 100644
--- a/fs/gfs2/xattr.c
+++ b/fs/gfs2/xattr.c
@@ -1356,14 +1356,14 @@ static int ea_dealloc_indirect(struct gfs2_inode *ip)
blen++;
else {
if (bstart)
- gfs2_rlist_add(sdp, &rlist, bstart);
+ gfs2_rlist_add(ip, &rlist, bstart);
bstart = bn;
blen = 1;
}
blks++;
}
if (bstart)
- gfs2_rlist_add(sdp, &rlist, bstart);
+ gfs2_rlist_add(ip, &rlist, bstart);
else
goto out;