aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/eattr.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2008-01-10 10:18:55 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2008-01-25 03:18:25 -0500
commit6dbd822487d0a9f14432cb4680415b80656b63a2 (patch)
treef0391d598c27cd7c39c67cfa13799a784f4c389a /fs/gfs2/eattr.c
parentac39aadd0440ae696e6dacaa8006ce1737b17008 (diff)
[GFS2] Reduce inode size by moving i_alloc out of line
It is possible to reduce the size of GFS2 inodes by taking the i_alloc structure out of the gfs2_inode. This patch allocates the i_alloc structure whenever its needed, and frees it afterward. This decreases the amount of low memory we use at the expense of requiring a memory allocation for each page or partial page that we write. A quick test with postmark shows that the overhead is not measurable and I also note that OCFS2 use the same approach. In the future I'd like to solve the problem by shrinking down the size of the members of the i_alloc structure, but for now, this reduces the immediate problem of using too much low-memory on x86 and doesn't add too much overhead. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/eattr.c')
-rw-r--r--fs/gfs2/eattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c
index 2a7435b5c4dc..bee99704ea10 100644
--- a/fs/gfs2/eattr.c
+++ b/fs/gfs2/eattr.c
@@ -1418,7 +1418,7 @@ out:
1418static int ea_dealloc_block(struct gfs2_inode *ip) 1418static int ea_dealloc_block(struct gfs2_inode *ip)
1419{ 1419{
1420 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 1420 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
1421 struct gfs2_alloc *al = &ip->i_alloc; 1421 struct gfs2_alloc *al = ip->i_alloc;
1422 struct gfs2_rgrpd *rgd; 1422 struct gfs2_rgrpd *rgd;
1423 struct buffer_head *dibh; 1423 struct buffer_head *dibh;
1424 int error; 1424 int error;