diff options
author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 12:13:20 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 12:13:20 -0500 |
commit | 1c1afa3c053d4ccdf44e5a4e159005cdfd48bfc6 (patch) | |
tree | 3e686ad4cf1ae2300e7190ff83afc3f3dd4ba740 /include | |
parent | 0a01707b289853f56d1c000057b27e243c039722 (diff) | |
parent | ac33d0710595579e3cfca42dde2257eb0b123f6d (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
* master.kernel.org:/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: (73 commits)
[DLM] Clean up lowcomms
[GFS2] Change gfs2_fsync() to use write_inode_now()
[GFS2] Fix indent in recovery.c
[GFS2] Don't flush everything on fdatasync
[GFS2] Add a comment about reading the super block
[GFS2] Mount problem with the GFS2 code
[GFS2] Remove gfs2_check_acl()
[DLM] fix format warnings in rcom.c and recoverd.c
[GFS2] lock function parameter
[DLM] don't accept replies to old recovery messages
[DLM] fix size of STATUS_REPLY message
[GFS2] fs/gfs2/log.c:log_bmap() fix printk format warning
[DLM] fix add_requestqueue checking nodes list
[GFS2] Fix recursive locking in gfs2_getattr
[GFS2] Fix recursive locking in gfs2_permission
[GFS2] Reduce number of arguments to meta_io.c:getbuf()
[GFS2] Move gfs2_meta_syncfs() into log.c
[GFS2] Fix journal flush problem
[GFS2] mark_inode_dirty after write to stuffed file
[GFS2] Fix glock ordering on inode creation
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/gfs2_ondisk.h | 138 |
1 files changed, 117 insertions, 21 deletions
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h index a7ae7c177cac..8b7e4c1e32ae 100644 --- a/include/linux/gfs2_ondisk.h +++ b/include/linux/gfs2_ondisk.h | |||
@@ -54,8 +54,13 @@ struct gfs2_inum { | |||
54 | __be64 no_addr; | 54 | __be64 no_addr; |
55 | }; | 55 | }; |
56 | 56 | ||
57 | static inline int gfs2_inum_equal(const struct gfs2_inum *ino1, | 57 | struct gfs2_inum_host { |
58 | const struct gfs2_inum *ino2) | 58 | __u64 no_formal_ino; |
59 | __u64 no_addr; | ||
60 | }; | ||
61 | |||
62 | static inline int gfs2_inum_equal(const struct gfs2_inum_host *ino1, | ||
63 | const struct gfs2_inum_host *ino2) | ||
59 | { | 64 | { |
60 | return ino1->no_formal_ino == ino2->no_formal_ino && | 65 | return ino1->no_formal_ino == ino2->no_formal_ino && |
61 | ino1->no_addr == ino2->no_addr; | 66 | ino1->no_addr == ino2->no_addr; |
@@ -89,6 +94,12 @@ struct gfs2_meta_header { | |||
89 | __be32 __pad1; /* Was incarnation number in gfs1 */ | 94 | __be32 __pad1; /* Was incarnation number in gfs1 */ |
90 | }; | 95 | }; |
91 | 96 | ||
97 | struct gfs2_meta_header_host { | ||
98 | __u32 mh_magic; | ||
99 | __u32 mh_type; | ||
100 | __u32 mh_format; | ||
101 | }; | ||
102 | |||
92 | /* | 103 | /* |
93 | * super-block structure | 104 | * super-block structure |
94 | * | 105 | * |
@@ -128,6 +139,23 @@ struct gfs2_sb { | |||
128 | /* In gfs1, quota and license dinodes followed */ | 139 | /* In gfs1, quota and license dinodes followed */ |
129 | }; | 140 | }; |
130 | 141 | ||
142 | struct gfs2_sb_host { | ||
143 | struct gfs2_meta_header_host sb_header; | ||
144 | |||
145 | __u32 sb_fs_format; | ||
146 | __u32 sb_multihost_format; | ||
147 | |||
148 | __u32 sb_bsize; | ||
149 | __u32 sb_bsize_shift; | ||
150 | |||
151 | struct gfs2_inum_host sb_master_dir; /* Was jindex dinode in gfs1 */ | ||
152 | struct gfs2_inum_host sb_root_dir; | ||
153 | |||
154 | char sb_lockproto[GFS2_LOCKNAME_LEN]; | ||
155 | char sb_locktable[GFS2_LOCKNAME_LEN]; | ||
156 | /* In gfs1, quota and license dinodes followed */ | ||
157 | }; | ||
158 | |||
131 | /* | 159 | /* |
132 | * resource index structure | 160 | * resource index structure |
133 | */ | 161 | */ |
@@ -145,6 +173,14 @@ struct gfs2_rindex { | |||
145 | __u8 ri_reserved[64]; | 173 | __u8 ri_reserved[64]; |
146 | }; | 174 | }; |
147 | 175 | ||
176 | struct gfs2_rindex_host { | ||
177 | __u64 ri_addr; /* grp block disk address */ | ||
178 | __u64 ri_data0; /* first data location */ | ||
179 | __u32 ri_length; /* length of rgrp header in fs blocks */ | ||
180 | __u32 ri_data; /* num of data blocks in rgrp */ | ||
181 | __u32 ri_bitbytes; /* number of bytes in data bitmaps */ | ||
182 | }; | ||
183 | |||
148 | /* | 184 | /* |
149 | * resource group header structure | 185 | * resource group header structure |
150 | */ | 186 | */ |
@@ -176,6 +212,13 @@ struct gfs2_rgrp { | |||
176 | __u8 rg_reserved[80]; /* Several fields from gfs1 now reserved */ | 212 | __u8 rg_reserved[80]; /* Several fields from gfs1 now reserved */ |
177 | }; | 213 | }; |
178 | 214 | ||
215 | struct gfs2_rgrp_host { | ||
216 | __u32 rg_flags; | ||
217 | __u32 rg_free; | ||
218 | __u32 rg_dinodes; | ||
219 | __u64 rg_igeneration; | ||
220 | }; | ||
221 | |||
179 | /* | 222 | /* |
180 | * quota structure | 223 | * quota structure |
181 | */ | 224 | */ |
@@ -187,6 +230,12 @@ struct gfs2_quota { | |||
187 | __u8 qu_reserved[64]; | 230 | __u8 qu_reserved[64]; |
188 | }; | 231 | }; |
189 | 232 | ||
233 | struct gfs2_quota_host { | ||
234 | __u64 qu_limit; | ||
235 | __u64 qu_warn; | ||
236 | __u64 qu_value; | ||
237 | }; | ||
238 | |||
190 | /* | 239 | /* |
191 | * dinode structure | 240 | * dinode structure |
192 | */ | 241 | */ |
@@ -270,6 +319,27 @@ struct gfs2_dinode { | |||
270 | __u8 di_reserved[56]; | 319 | __u8 di_reserved[56]; |
271 | }; | 320 | }; |
272 | 321 | ||
322 | struct gfs2_dinode_host { | ||
323 | __u64 di_size; /* number of bytes in file */ | ||
324 | __u64 di_blocks; /* number of blocks in file */ | ||
325 | |||
326 | /* This section varies from gfs1. Padding added to align with | ||
327 | * remainder of dinode | ||
328 | */ | ||
329 | __u64 di_goal_meta; /* rgrp to alloc from next */ | ||
330 | __u64 di_goal_data; /* data block goal */ | ||
331 | __u64 di_generation; /* generation number for NFS */ | ||
332 | |||
333 | __u32 di_flags; /* GFS2_DIF_... */ | ||
334 | __u16 di_height; /* height of metadata */ | ||
335 | |||
336 | /* These only apply to directories */ | ||
337 | __u16 di_depth; /* Number of bits in the table */ | ||
338 | __u32 di_entries; /* The number of entries in the directory */ | ||
339 | |||
340 | __u64 di_eattr; /* extended attribute block number */ | ||
341 | }; | ||
342 | |||
273 | /* | 343 | /* |
274 | * directory structure - many of these per directory file | 344 | * directory structure - many of these per directory file |
275 | */ | 345 | */ |
@@ -344,6 +414,16 @@ struct gfs2_log_header { | |||
344 | __be32 lh_hash; | 414 | __be32 lh_hash; |
345 | }; | 415 | }; |
346 | 416 | ||
417 | struct gfs2_log_header_host { | ||
418 | struct gfs2_meta_header_host lh_header; | ||
419 | |||
420 | __u64 lh_sequence; /* Sequence number of this transaction */ | ||
421 | __u32 lh_flags; /* GFS2_LOG_HEAD_... */ | ||
422 | __u32 lh_tail; /* Block number of log tail */ | ||
423 | __u32 lh_blkno; | ||
424 | __u32 lh_hash; | ||
425 | }; | ||
426 | |||
347 | /* | 427 | /* |
348 | * Log type descriptor | 428 | * Log type descriptor |
349 | */ | 429 | */ |
@@ -384,6 +464,11 @@ struct gfs2_inum_range { | |||
384 | __be64 ir_length; | 464 | __be64 ir_length; |
385 | }; | 465 | }; |
386 | 466 | ||
467 | struct gfs2_inum_range_host { | ||
468 | __u64 ir_start; | ||
469 | __u64 ir_length; | ||
470 | }; | ||
471 | |||
387 | /* | 472 | /* |
388 | * Statfs change | 473 | * Statfs change |
389 | * Describes an change to the pool of free and allocated | 474 | * Describes an change to the pool of free and allocated |
@@ -396,6 +481,12 @@ struct gfs2_statfs_change { | |||
396 | __be64 sc_dinodes; | 481 | __be64 sc_dinodes; |
397 | }; | 482 | }; |
398 | 483 | ||
484 | struct gfs2_statfs_change_host { | ||
485 | __u64 sc_total; | ||
486 | __u64 sc_free; | ||
487 | __u64 sc_dinodes; | ||
488 | }; | ||
489 | |||
399 | /* | 490 | /* |
400 | * Quota change | 491 | * Quota change |
401 | * Describes an allocation change for a particular | 492 | * Describes an allocation change for a particular |
@@ -410,33 +501,38 @@ struct gfs2_quota_change { | |||
410 | __be32 qc_id; | 501 | __be32 qc_id; |
411 | }; | 502 | }; |
412 | 503 | ||
504 | struct gfs2_quota_change_host { | ||
505 | __u64 qc_change; | ||
506 | __u32 qc_flags; /* GFS2_QCF_... */ | ||
507 | __u32 qc_id; | ||
508 | }; | ||
509 | |||
413 | #ifdef __KERNEL__ | 510 | #ifdef __KERNEL__ |
414 | /* Translation functions */ | 511 | /* Translation functions */ |
415 | 512 | ||
416 | extern void gfs2_inum_in(struct gfs2_inum *no, const void *buf); | 513 | extern void gfs2_inum_in(struct gfs2_inum_host *no, const void *buf); |
417 | extern void gfs2_inum_out(const struct gfs2_inum *no, void *buf); | 514 | extern void gfs2_inum_out(const struct gfs2_inum_host *no, void *buf); |
418 | extern void gfs2_sb_in(struct gfs2_sb *sb, const void *buf); | 515 | extern void gfs2_sb_in(struct gfs2_sb_host *sb, const void *buf); |
419 | extern void gfs2_rindex_in(struct gfs2_rindex *ri, const void *buf); | 516 | extern void gfs2_rindex_in(struct gfs2_rindex_host *ri, const void *buf); |
420 | extern void gfs2_rindex_out(const struct gfs2_rindex *ri, void *buf); | 517 | extern void gfs2_rindex_out(const struct gfs2_rindex_host *ri, void *buf); |
421 | extern void gfs2_rgrp_in(struct gfs2_rgrp *rg, const void *buf); | 518 | extern void gfs2_rgrp_in(struct gfs2_rgrp_host *rg, const void *buf); |
422 | extern void gfs2_rgrp_out(const struct gfs2_rgrp *rg, void *buf); | 519 | extern void gfs2_rgrp_out(const struct gfs2_rgrp_host *rg, void *buf); |
423 | extern void gfs2_quota_in(struct gfs2_quota *qu, const void *buf); | 520 | extern void gfs2_quota_in(struct gfs2_quota_host *qu, const void *buf); |
424 | extern void gfs2_quota_out(const struct gfs2_quota *qu, void *buf); | 521 | struct gfs2_inode; |
425 | extern void gfs2_dinode_in(struct gfs2_dinode *di, const void *buf); | 522 | extern void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf); |
426 | extern void gfs2_dinode_out(const struct gfs2_dinode *di, void *buf); | ||
427 | extern void gfs2_ea_header_in(struct gfs2_ea_header *ea, const void *buf); | 523 | 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); | 524 | 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); | 525 | extern void gfs2_log_header_in(struct gfs2_log_header_host *lh, const void *buf); |
430 | extern void gfs2_inum_range_in(struct gfs2_inum_range *ir, const void *buf); | 526 | extern void gfs2_inum_range_in(struct gfs2_inum_range_host *ir, const void *buf); |
431 | extern void gfs2_inum_range_out(const struct gfs2_inum_range *ir, void *buf); | 527 | extern void gfs2_inum_range_out(const struct gfs2_inum_range_host *ir, void *buf); |
432 | extern void gfs2_statfs_change_in(struct gfs2_statfs_change *sc, const void *buf); | 528 | extern void gfs2_statfs_change_in(struct gfs2_statfs_change_host *sc, const void *buf); |
433 | extern void gfs2_statfs_change_out(const struct gfs2_statfs_change *sc, void *buf); | 529 | extern void gfs2_statfs_change_out(const struct gfs2_statfs_change_host *sc, void *buf); |
434 | extern void gfs2_quota_change_in(struct gfs2_quota_change *qc, const void *buf); | 530 | extern void gfs2_quota_change_in(struct gfs2_quota_change_host *qc, const void *buf); |
435 | 531 | ||
436 | /* Printing functions */ | 532 | /* Printing functions */ |
437 | 533 | ||
438 | extern void gfs2_rindex_print(const struct gfs2_rindex *ri); | 534 | extern void gfs2_rindex_print(const struct gfs2_rindex_host *ri); |
439 | extern void gfs2_dinode_print(const struct gfs2_dinode *di); | 535 | extern void gfs2_dinode_print(const struct gfs2_inode *ip); |
440 | 536 | ||
441 | #endif /* __KERNEL__ */ | 537 | #endif /* __KERNEL__ */ |
442 | 538 | ||