diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2011-09-01 13:31:59 +0100 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2011-10-21 12:39:34 +0100 |
commit | 54335b1fca27b84baa75b1f45985d98262003837 (patch) | |
tree | c6b21aff1759d86be56208e9981117e4383c3f47 /fs/gfs2/super.c | |
parent | 8339ee543ece6e2dcc1bbd97d5350163c198cf00 (diff) | |
download | talos-op-linux-54335b1fca27b84baa75b1f45985d98262003837.tar.gz talos-op-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/super.c')
-rw-r--r-- | fs/gfs2/super.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index f716c4f8b252..87e9141a4def 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -1574,6 +1574,7 @@ static struct inode *gfs2_alloc_inode(struct super_block *sb) if (ip) { ip->i_flags = 0; ip->i_gl = NULL; + ip->i_rgd = NULL; } return &ip->i_inode; } |