diff options
-rw-r--r-- | fs/gfs2/inode.c | 4 | ||||
-rw-r--r-- | fs/gfs2/ondisk.c | 6 | ||||
-rw-r--r-- | include/linux/gfs2_ondisk.h | 48 |
3 files changed, 50 insertions, 8 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index d470e5286ecd..191a3df93d67 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -48,7 +48,7 @@ | |||
48 | void gfs2_inode_attr_in(struct gfs2_inode *ip) | 48 | void gfs2_inode_attr_in(struct gfs2_inode *ip) |
49 | { | 49 | { |
50 | struct inode *inode = &ip->i_inode; | 50 | struct inode *inode = &ip->i_inode; |
51 | struct gfs2_dinode *di = &ip->i_di; | 51 | struct gfs2_dinode_host *di = &ip->i_di; |
52 | 52 | ||
53 | inode->i_ino = ip->i_num.no_addr; | 53 | inode->i_ino = ip->i_num.no_addr; |
54 | 54 | ||
@@ -98,7 +98,7 @@ void gfs2_inode_attr_in(struct gfs2_inode *ip) | |||
98 | void gfs2_inode_attr_out(struct gfs2_inode *ip) | 98 | void gfs2_inode_attr_out(struct gfs2_inode *ip) |
99 | { | 99 | { |
100 | struct inode *inode = &ip->i_inode; | 100 | struct inode *inode = &ip->i_inode; |
101 | struct gfs2_dinode *di = &ip->i_di; | 101 | struct gfs2_dinode_host *di = &ip->i_di; |
102 | gfs2_assert_withdraw(GFS2_SB(inode), | 102 | gfs2_assert_withdraw(GFS2_SB(inode), |
103 | (di->di_mode & S_IFMT) == (inode->i_mode & S_IFMT)); | 103 | (di->di_mode & S_IFMT) == (inode->i_mode & S_IFMT)); |
104 | di->di_mode = inode->i_mode; | 104 | di->di_mode = inode->i_mode; |
diff --git a/fs/gfs2/ondisk.c b/fs/gfs2/ondisk.c index 1025960b0e6e..52cb9a2dc058 100644 --- a/fs/gfs2/ondisk.c +++ b/fs/gfs2/ondisk.c | |||
@@ -153,7 +153,7 @@ void gfs2_quota_in(struct gfs2_quota *qu, const void *buf) | |||
153 | qu->qu_value = be64_to_cpu(str->qu_value); | 153 | qu->qu_value = be64_to_cpu(str->qu_value); |
154 | } | 154 | } |
155 | 155 | ||
156 | void gfs2_dinode_in(struct gfs2_dinode *di, const void *buf) | 156 | void gfs2_dinode_in(struct gfs2_dinode_host *di, const void *buf) |
157 | { | 157 | { |
158 | const struct gfs2_dinode *str = buf; | 158 | const struct gfs2_dinode *str = buf; |
159 | 159 | ||
@@ -187,7 +187,7 @@ void gfs2_dinode_in(struct gfs2_dinode *di, const void *buf) | |||
187 | 187 | ||
188 | } | 188 | } |
189 | 189 | ||
190 | void gfs2_dinode_out(const struct gfs2_dinode *di, void *buf) | 190 | void gfs2_dinode_out(const struct gfs2_dinode_host *di, void *buf) |
191 | { | 191 | { |
192 | struct gfs2_dinode *str = buf; | 192 | struct gfs2_dinode *str = buf; |
193 | 193 | ||
@@ -221,7 +221,7 @@ void gfs2_dinode_out(const struct gfs2_dinode *di, void *buf) | |||
221 | 221 | ||
222 | } | 222 | } |
223 | 223 | ||
224 | void gfs2_dinode_print(const struct gfs2_dinode *di) | 224 | void gfs2_dinode_print(const struct gfs2_dinode_host *di) |
225 | { | 225 | { |
226 | gfs2_meta_header_print(&di->di_header); | 226 | gfs2_meta_header_print(&di->di_header); |
227 | gfs2_inum_print(&di->di_num); | 227 | gfs2_inum_print(&di->di_num); |
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h index a7ae7c177cac..f334b4bd2915 100644 --- a/include/linux/gfs2_ondisk.h +++ b/include/linux/gfs2_ondisk.h | |||
@@ -270,6 +270,48 @@ struct gfs2_dinode { | |||
270 | __u8 di_reserved[56]; | 270 | __u8 di_reserved[56]; |
271 | }; | 271 | }; |
272 | 272 | ||
273 | struct gfs2_dinode_host { | ||
274 | struct gfs2_meta_header di_header; | ||
275 | |||
276 | struct gfs2_inum di_num; | ||
277 | |||
278 | __be32 di_mode; /* mode of file */ | ||
279 | __be32 di_uid; /* owner's user id */ | ||
280 | __be32 di_gid; /* owner's group id */ | ||
281 | __be32 di_nlink; /* number of links to this file */ | ||
282 | __be64 di_size; /* number of bytes in file */ | ||
283 | __be64 di_blocks; /* number of blocks in file */ | ||
284 | __be64 di_atime; /* time last accessed */ | ||
285 | __be64 di_mtime; /* time last modified */ | ||
286 | __be64 di_ctime; /* time last changed */ | ||
287 | __be32 di_major; /* device major number */ | ||
288 | __be32 di_minor; /* device minor number */ | ||
289 | |||
290 | /* This section varies from gfs1. Padding added to align with | ||
291 | * remainder of dinode | ||
292 | */ | ||
293 | __be64 di_goal_meta; /* rgrp to alloc from next */ | ||
294 | __be64 di_goal_data; /* data block goal */ | ||
295 | __be64 di_generation; /* generation number for NFS */ | ||
296 | |||
297 | __be32 di_flags; /* GFS2_DIF_... */ | ||
298 | __be32 di_payload_format; /* GFS2_FORMAT_... */ | ||
299 | __u16 __pad1; /* Was ditype in gfs1 */ | ||
300 | __be16 di_height; /* height of metadata */ | ||
301 | __u32 __pad2; /* Unused incarnation number from gfs1 */ | ||
302 | |||
303 | /* These only apply to directories */ | ||
304 | __u16 __pad3; /* Padding */ | ||
305 | __be16 di_depth; /* Number of bits in the table */ | ||
306 | __be32 di_entries; /* The number of entries in the directory */ | ||
307 | |||
308 | struct gfs2_inum __pad4; /* Unused even in current gfs1 */ | ||
309 | |||
310 | __be64 di_eattr; /* extended attribute block number */ | ||
311 | |||
312 | __u8 di_reserved[56]; | ||
313 | }; | ||
314 | |||
273 | /* | 315 | /* |
274 | * directory structure - many of these per directory file | 316 | * directory structure - many of these per directory file |
275 | */ | 317 | */ |
@@ -422,8 +464,8 @@ extern void gfs2_rgrp_in(struct gfs2_rgrp *rg, const void *buf); | |||
422 | extern void gfs2_rgrp_out(const struct gfs2_rgrp *rg, void *buf); | 464 | extern void gfs2_rgrp_out(const struct gfs2_rgrp *rg, void *buf); |
423 | extern void gfs2_quota_in(struct gfs2_quota *qu, const void *buf); | 465 | extern void gfs2_quota_in(struct gfs2_quota *qu, const void *buf); |
424 | extern void gfs2_quota_out(const struct gfs2_quota *qu, void *buf); | 466 | extern void gfs2_quota_out(const struct gfs2_quota *qu, void *buf); |
425 | extern void gfs2_dinode_in(struct gfs2_dinode *di, const void *buf); | 467 | extern void gfs2_dinode_in(struct gfs2_dinode_host *di, const void *buf); |
426 | extern void gfs2_dinode_out(const struct gfs2_dinode *di, void *buf); | 468 | extern void gfs2_dinode_out(const struct gfs2_dinode_host *di, void *buf); |
427 | extern void gfs2_ea_header_in(struct gfs2_ea_header *ea, const void *buf); | 469 | extern void gfs2_ea_header_in(struct gfs2_ea_header *ea, const void *buf); |
428 | extern void gfs2_ea_header_out(const struct gfs2_ea_header *ea, void *buf); | 470 | extern void gfs2_ea_header_out(const struct gfs2_ea_header *ea, void *buf); |
429 | extern void gfs2_log_header_in(struct gfs2_log_header *lh, const void *buf); | 471 | extern void gfs2_log_header_in(struct gfs2_log_header *lh, const void *buf); |
@@ -436,7 +478,7 @@ extern void gfs2_quota_change_in(struct gfs2_quota_change *qc, const void *buf); | |||
436 | /* Printing functions */ | 478 | /* Printing functions */ |
437 | 479 | ||
438 | extern void gfs2_rindex_print(const struct gfs2_rindex *ri); | 480 | extern void gfs2_rindex_print(const struct gfs2_rindex *ri); |
439 | extern void gfs2_dinode_print(const struct gfs2_dinode *di); | 481 | extern void gfs2_dinode_print(const struct gfs2_dinode_host *di); |
440 | 482 | ||
441 | #endif /* __KERNEL__ */ | 483 | #endif /* __KERNEL__ */ |
442 | 484 | ||