aboutsummaryrefslogtreecommitdiff
path: root/fs/gfs2/ondisk.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/ondisk.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/ondisk.c')
-rw-r--r--fs/gfs2/ondisk.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/gfs2/ondisk.c b/fs/gfs2/ondisk.c
index 09154ad7b27..39c7f0345fc 100644
--- a/fs/gfs2/ondisk.c
+++ b/fs/gfs2/ondisk.c
@@ -128,6 +128,7 @@ void gfs2_rgrp_in(struct gfs2_rgrp *rg, char *buf)
rg->rg_flags = be32_to_cpu(str->rg_flags);
rg->rg_free = be32_to_cpu(str->rg_free);
rg->rg_dinodes = be32_to_cpu(str->rg_dinodes);
+ rg->rg_igeneration = be64_to_cpu(str->rg_igeneration);
}
void gfs2_rgrp_out(struct gfs2_rgrp *rg, char *buf)
@@ -138,7 +139,8 @@ void gfs2_rgrp_out(struct gfs2_rgrp *rg, char *buf)
str->rg_flags = cpu_to_be32(rg->rg_flags);
str->rg_free = cpu_to_be32(rg->rg_free);
str->rg_dinodes = cpu_to_be32(rg->rg_dinodes);
-
+ str->__pad = cpu_to_be32(0);
+ str->rg_igeneration = cpu_to_be64(rg->rg_igeneration);
memset(&str->rg_reserved, 0, sizeof(str->rg_reserved));
}
@@ -172,6 +174,7 @@ void gfs2_dinode_in(struct gfs2_dinode *di, char *buf)
di->di_goal_meta = be64_to_cpu(str->di_goal_meta);
di->di_goal_data = be64_to_cpu(str->di_goal_data);
+ di->di_generation = be64_to_cpu(str->di_generation);
di->di_flags = be32_to_cpu(str->di_flags);
di->di_payload_format = be32_to_cpu(str->di_payload_format);
@@ -205,6 +208,7 @@ void gfs2_dinode_out(struct gfs2_dinode *di, char *buf)
str->di_goal_meta = cpu_to_be64(di->di_goal_meta);
str->di_goal_data = cpu_to_be64(di->di_goal_data);
+ str->di_generation = cpu_to_be64(di->di_generation);
str->di_flags = cpu_to_be32(di->di_flags);
str->di_payload_format = cpu_to_be32(di->di_payload_format);