aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/gfs2_ondisk.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-10-13 20:11:25 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-11-30 10:32:50 -0500
commit3ca68df6ee61e1a2034f3307b9edb9b3d87e5ca1 (patch)
tree9172d33578fe98a6cba4c6819cd868be290fe0c1 /include/linux/gfs2_ondisk.h
parent0215ffb08ce99e2bb59eca114a99499a4d06e704 (diff)
[GFS2] split gfs2_dinode into on-disk and host variants
The latter is used as part of gfs2-private part of struct inode. It actually stores a lot of fields differently; for now the declaration is just cloned, inode field is swtiched and changes propagated. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'include/linux/gfs2_ondisk.h')
-rw-r--r--include/linux/gfs2_ondisk.h48
1 files changed, 45 insertions, 3 deletions
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
273struct 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);
422extern void gfs2_rgrp_out(const struct gfs2_rgrp *rg, void *buf); 464extern void gfs2_rgrp_out(const struct gfs2_rgrp *rg, void *buf);
423extern void gfs2_quota_in(struct gfs2_quota *qu, const void *buf); 465extern void gfs2_quota_in(struct gfs2_quota *qu, const void *buf);
424extern void gfs2_quota_out(const struct gfs2_quota *qu, void *buf); 466extern void gfs2_quota_out(const struct gfs2_quota *qu, void *buf);
425extern void gfs2_dinode_in(struct gfs2_dinode *di, const void *buf); 467extern void gfs2_dinode_in(struct gfs2_dinode_host *di, const void *buf);
426extern void gfs2_dinode_out(const struct gfs2_dinode *di, void *buf); 468extern void gfs2_dinode_out(const struct gfs2_dinode_host *di, void *buf);
427extern void gfs2_ea_header_in(struct gfs2_ea_header *ea, const void *buf); 469extern void gfs2_ea_header_in(struct gfs2_ea_header *ea, const void *buf);
428extern void gfs2_ea_header_out(const struct gfs2_ea_header *ea, void *buf); 470extern void gfs2_ea_header_out(const struct gfs2_ea_header *ea, void *buf);
429extern void gfs2_log_header_in(struct gfs2_log_header *lh, const void *buf); 471extern 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
438extern void gfs2_rindex_print(const struct gfs2_rindex *ri); 480extern void gfs2_rindex_print(const struct gfs2_rindex *ri);
439extern void gfs2_dinode_print(const struct gfs2_dinode *di); 481extern void gfs2_dinode_print(const struct gfs2_dinode_host *di);
440 482
441#endif /* __KERNEL__ */ 483#endif /* __KERNEL__ */
442 484