diff options
author | Bob Peterson <rpeterso@redhat.com> | 2018-06-13 16:52:47 +0300 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2018-06-21 15:39:31 +0300 |
commit | f85c10e24ab9fd8ccb6de3d6061a3110ff3581df (patch) | |
tree | ac348f7630b1f2103fd679609f49bc73072047ce /fs/gfs2/rgrp.c | |
parent | f0dc7f9c6dd99891611fca5849cbc4c6965b690e (diff) | |
download | linux-f85c10e24ab9fd8ccb6de3d6061a3110ff3581df.tar.xz |
gfs2: eliminate rs_inum and reduce the size of gfs2 inodes
Before this patch, block reservations kept track of the inode
number. At one point, that was a valid thing to do. However, since
we made the reservation a part of the inode (rather than a pointer
to a separate allocated object) the reservation can determine the
inode number by using container_of. This saves us a little memory
in our inode.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/rgrp.c')
-rw-r--r-- | fs/gfs2/rgrp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 6bc5cfe710d1..7a001f6e8aee 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -607,8 +607,10 @@ int gfs2_rsqa_alloc(struct gfs2_inode *ip) static void dump_rs(struct seq_file *seq, const struct gfs2_blkreserv *rs) { + struct gfs2_inode *ip = container_of(rs, struct gfs2_inode, i_res); + gfs2_print_dbg(seq, " B: n:%llu s:%llu b:%u f:%u\n", - (unsigned long long)rs->rs_inum, + (unsigned long long)ip->i_no_addr, (unsigned long long)gfs2_rbm_to_block(&rs->rs_rbm), rs->rs_rbm.offset, rs->rs_free); } @@ -1528,7 +1530,6 @@ static void rg_mblk_search(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip, if (ret == 0) { rs->rs_rbm = rbm; rs->rs_free = extlen; - rs->rs_inum = ip->i_no_addr; rs_insert(ip); } else { if (goal == rgd->rd_last_alloc + rgd->rd_data0) |