aboutsummaryrefslogtreecommitdiffstats
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 09154ad7b270..39c7f0345fc6 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)
128 rg->rg_flags = be32_to_cpu(str->rg_flags); 128 rg->rg_flags = be32_to_cpu(str->rg_flags);
129 rg->rg_free = be32_to_cpu(str->rg_free); 129 rg->rg_free = be32_to_cpu(str->rg_free);
130 rg->rg_dinodes = be32_to_cpu(str->rg_dinodes); 130 rg->rg_dinodes = be32_to_cpu(str->rg_dinodes);
131 rg->rg_igeneration = be64_to_cpu(str->rg_igeneration);
131} 132}
132 133
133void gfs2_rgrp_out(struct gfs2_rgrp *rg, char *buf) 134void gfs2_rgrp_out(struct gfs2_rgrp *rg, char *buf)
@@ -138,7 +139,8 @@ void gfs2_rgrp_out(struct gfs2_rgrp *rg, char *buf)
138 str->rg_flags = cpu_to_be32(rg->rg_flags); 139 str->rg_flags = cpu_to_be32(rg->rg_flags);
139 str->rg_free = cpu_to_be32(rg->rg_free); 140 str->rg_free = cpu_to_be32(rg->rg_free);
140 str->rg_dinodes = cpu_to_be32(rg->rg_dinodes); 141 str->rg_dinodes = cpu_to_be32(rg->rg_dinodes);
141 142 str->__pad = cpu_to_be32(0);
143 str->rg_igeneration = cpu_to_be64(rg->rg_igeneration);
142 memset(&str->rg_reserved, 0, sizeof(str->rg_reserved)); 144 memset(&str->rg_reserved, 0, sizeof(str->rg_reserved));
143} 145}
144 146
@@ -172,6 +174,7 @@ void gfs2_dinode_in(struct gfs2_dinode *di, char *buf)
172 174
173 di->di_goal_meta = be64_to_cpu(str->di_goal_meta); 175 di->di_goal_meta = be64_to_cpu(str->di_goal_meta);
174 di->di_goal_data = be64_to_cpu(str->di_goal_data); 176 di->di_goal_data = be64_to_cpu(str->di_goal_data);
177 di->di_generation = be64_to_cpu(str->di_generation);
175 178
176 di->di_flags = be32_to_cpu(str->di_flags); 179 di->di_flags = be32_to_cpu(str->di_flags);
177 di->di_payload_format = be32_to_cpu(str->di_payload_format); 180 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)
205 208
206 str->di_goal_meta = cpu_to_be64(di->di_goal_meta); 209 str->di_goal_meta = cpu_to_be64(di->di_goal_meta);
207 str->di_goal_data = cpu_to_be64(di->di_goal_data); 210 str->di_goal_data = cpu_to_be64(di->di_goal_data);
211 str->di_generation = cpu_to_be64(di->di_generation);
208 212
209 str->di_flags = cpu_to_be32(di->di_flags); 213 str->di_flags = cpu_to_be32(di->di_flags);
210 str->di_payload_format = cpu_to_be32(di->di_payload_format); 214 str->di_payload_format = cpu_to_be32(di->di_payload_format);