aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/rgrp.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-07-11 09:46:33 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-07-11 09:46:33 -0400
commit4340fe62531f7d1dafb6f5359ffe0378bdb0db80 (patch)
tree95ee3f2ace3b07e2fa89a9a01ccd5ac40a556eee /fs/gfs2/rgrp.c
parentffeb874b2b893aea7d10b0b088e06a7b1ded2a3e (diff)
[GFS2] Add generation number
This adds a generation number for the eventual use of NFS to the ondisk inode. Its backward compatible with the current code since it doesn't really matter what the generation number is to start with, and indeed since its set to zero, due to it being taken from padding in both the inode and rgrp header, it should be fine. The eventual plan is to use this rather than no_formal_ino in the NFS filehandles. At that point no_formal_ino will be unused. At the same time we also add a releasepages call back to the "normal" address space for gfs2 inodes. Also I've removed a one-linrer function thats not required any more. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/rgrp.c')
-rw-r--r--fs/gfs2/rgrp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 14c1f88bfb5d..65eea0b88bf7 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -1205,7 +1205,7 @@ static struct gfs2_rgrpd *rgblk_free(struct gfs2_sbd *sdp, uint64_t bstart,
1205 * Returns: the allocated block 1205 * Returns: the allocated block
1206 */ 1206 */
1207 1207
1208uint64_t gfs2_alloc_data(struct gfs2_inode *ip) 1208u64 gfs2_alloc_data(struct gfs2_inode *ip)
1209{ 1209{
1210 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 1210 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
1211 struct gfs2_alloc *al = &ip->i_alloc; 1211 struct gfs2_alloc *al = &ip->i_alloc;
@@ -1249,7 +1249,7 @@ uint64_t gfs2_alloc_data(struct gfs2_inode *ip)
1249 * Returns: the allocated block 1249 * Returns: the allocated block
1250 */ 1250 */
1251 1251
1252uint64_t gfs2_alloc_meta(struct gfs2_inode *ip) 1252u64 gfs2_alloc_meta(struct gfs2_inode *ip)
1253{ 1253{
1254 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 1254 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
1255 struct gfs2_alloc *al = &ip->i_alloc; 1255 struct gfs2_alloc *al = &ip->i_alloc;
@@ -1294,13 +1294,13 @@ uint64_t gfs2_alloc_meta(struct gfs2_inode *ip)
1294 * Returns: the block allocated 1294 * Returns: the block allocated
1295 */ 1295 */
1296 1296
1297uint64_t gfs2_alloc_di(struct gfs2_inode *dip) 1297u64 gfs2_alloc_di(struct gfs2_inode *dip, u64 *generation)
1298{ 1298{
1299 struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode); 1299 struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode);
1300 struct gfs2_alloc *al = &dip->i_alloc; 1300 struct gfs2_alloc *al = &dip->i_alloc;
1301 struct gfs2_rgrpd *rgd = al->al_rgd; 1301 struct gfs2_rgrpd *rgd = al->al_rgd;
1302 uint32_t blk; 1302 u32 blk;
1303 uint64_t block; 1303 u64 block;
1304 1304
1305 blk = rgblk_search(rgd, rgd->rd_last_alloc_meta, 1305 blk = rgblk_search(rgd, rgd->rd_last_alloc_meta,
1306 GFS2_BLKST_FREE, GFS2_BLKST_DINODE); 1306 GFS2_BLKST_FREE, GFS2_BLKST_DINODE);
@@ -1312,7 +1312,7 @@ uint64_t gfs2_alloc_di(struct gfs2_inode *dip)
1312 gfs2_assert_withdraw(sdp, rgd->rd_rg.rg_free); 1312 gfs2_assert_withdraw(sdp, rgd->rd_rg.rg_free);
1313 rgd->rd_rg.rg_free--; 1313 rgd->rd_rg.rg_free--;
1314 rgd->rd_rg.rg_dinodes++; 1314 rgd->rd_rg.rg_dinodes++;
1315 1315 *generation = rgd->rd_rg.rg_igeneration++;
1316 gfs2_trans_add_bh(rgd->rd_gl, rgd->rd_bits[0].bi_bh, 1); 1316 gfs2_trans_add_bh(rgd->rd_gl, rgd->rd_bits[0].bi_bh, 1);
1317 gfs2_rgrp_out(&rgd->rd_rg, rgd->rd_bits[0].bi_bh->b_data); 1317 gfs2_rgrp_out(&rgd->rd_rg, rgd->rd_bits[0].bi_bh->b_data);
1318 1318