diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2011-09-01 14:31:59 +0200 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2011-10-21 13:39:34 +0200 |
commit | 54335b1fca27b84baa75b1f45985d98262003837 (patch) | |
tree | c6b21aff1759d86be56208e9981117e4383c3f47 /fs/gfs2/xattr.c | |
parent | GFS2: Make resource groups "append only" during life of fs (diff) | |
download | linux-54335b1fca27b84baa75b1f45985d98262003837.tar.xz linux-54335b1fca27b84baa75b1f45985d98262003837.zip |
GFS2: Cache the most recently used resource group in the inode
This means that after the initial allocation for any inode, the
last used resource group is cached in the inode for future use.
This drastically reduces the number of lookups of resource
groups in the common case, and this the contention on that
data structure.
The allocation algorithm is the same as previously, except that we
always check to see if the goal block is within the cached rgrp
first before going to the rbtree to look one up.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/xattr.c')
-rw-r--r-- | fs/gfs2/xattr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/xattr.c b/fs/gfs2/xattr.c index 167f4af53b1d..e7bf0ea1c3cc 100644 --- a/fs/gfs2/xattr.c +++ b/fs/gfs2/xattr.c @@ -727,7 +727,7 @@ static int ea_alloc_skeleton(struct gfs2_inode *ip, struct gfs2_ea_request *er, goto out_gunlock_q; error = gfs2_trans_begin(GFS2_SB(&ip->i_inode), - blks + gfs2_rg_blocks(al) + + blks + gfs2_rg_blocks(ip) + RES_DINODE + RES_STATFS + RES_QUOTA, 0); if (error) goto out_ipres; |