aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/reiserfs_fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/reiserfs_fs.h')
-rw-r--r--include/linux/reiserfs_fs.h249
1 files changed, 107 insertions, 142 deletions
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index bccff8b17dc4..32148625fc2f 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -114,47 +114,47 @@ if( !( cond ) ) \
114 114
115 115
116struct journal_params { 116struct journal_params {
117 __u32 jp_journal_1st_block; /* where does journal start from on its 117 __le32 jp_journal_1st_block; /* where does journal start from on its
118 * device */ 118 * device */
119 __u32 jp_journal_dev; /* journal device st_rdev */ 119 __le32 jp_journal_dev; /* journal device st_rdev */
120 __u32 jp_journal_size; /* size of the journal */ 120 __le32 jp_journal_size; /* size of the journal */
121 __u32 jp_journal_trans_max; /* max number of blocks in a transaction. */ 121 __le32 jp_journal_trans_max; /* max number of blocks in a transaction. */
122 __u32 jp_journal_magic; /* random value made on fs creation (this 122 __le32 jp_journal_magic; /* random value made on fs creation (this
123 * was sb_journal_block_count) */ 123 * was sb_journal_block_count) */
124 __u32 jp_journal_max_batch; /* max number of blocks to batch into a 124 __le32 jp_journal_max_batch; /* max number of blocks to batch into a
125 * trans */ 125 * trans */
126 __u32 jp_journal_max_commit_age; /* in seconds, how old can an async 126 __le32 jp_journal_max_commit_age; /* in seconds, how old can an async
127 * commit be */ 127 * commit be */
128 __u32 jp_journal_max_trans_age; /* in seconds, how old can a transaction 128 __le32 jp_journal_max_trans_age; /* in seconds, how old can a transaction
129 * be */ 129 * be */
130}; 130};
131 131
132/* this is the super from 3.5.X, where X >= 10 */ 132/* this is the super from 3.5.X, where X >= 10 */
133struct reiserfs_super_block_v1 133struct reiserfs_super_block_v1
134{ 134{
135 __u32 s_block_count; /* blocks count */ 135 __le32 s_block_count; /* blocks count */
136 __u32 s_free_blocks; /* free blocks count */ 136 __le32 s_free_blocks; /* free blocks count */
137 __u32 s_root_block; /* root block number */ 137 __le32 s_root_block; /* root block number */
138 struct journal_params s_journal; 138 struct journal_params s_journal;
139 __u16 s_blocksize; /* block size */ 139 __le16 s_blocksize; /* block size */
140 __u16 s_oid_maxsize; /* max size of object id array, see 140 __le16 s_oid_maxsize; /* max size of object id array, see
141 * get_objectid() commentary */ 141 * get_objectid() commentary */
142 __u16 s_oid_cursize; /* current size of object id array */ 142 __le16 s_oid_cursize; /* current size of object id array */
143 __u16 s_umount_state; /* this is set to 1 when filesystem was 143 __le16 s_umount_state; /* this is set to 1 when filesystem was
144 * umounted, to 2 - when not */ 144 * umounted, to 2 - when not */
145 char s_magic[10]; /* reiserfs magic string indicates that 145 char s_magic[10]; /* reiserfs magic string indicates that
146 * file system is reiserfs: 146 * file system is reiserfs:
147 * "ReIsErFs" or "ReIsEr2Fs" or "ReIsEr3Fs" */ 147 * "ReIsErFs" or "ReIsEr2Fs" or "ReIsEr3Fs" */
148 __u16 s_fs_state; /* it is set to used by fsck to mark which 148 __le16 s_fs_state; /* it is set to used by fsck to mark which
149 * phase of rebuilding is done */ 149 * phase of rebuilding is done */
150 __u32 s_hash_function_code; /* indicate, what hash function is being use 150 __le32 s_hash_function_code; /* indicate, what hash function is being use
151 * to sort names in a directory*/ 151 * to sort names in a directory*/
152 __u16 s_tree_height; /* height of disk tree */ 152 __le16 s_tree_height; /* height of disk tree */
153 __u16 s_bmap_nr; /* amount of bitmap blocks needed to address 153 __le16 s_bmap_nr; /* amount of bitmap blocks needed to address
154 * each block of file system */ 154 * each block of file system */
155 __u16 s_version; /* this field is only reliable on filesystem 155 __le16 s_version; /* this field is only reliable on filesystem
156 * with non-standard journal */ 156 * with non-standard journal */
157 __u16 s_reserved_for_journal; /* size in blocks of journal area on main 157 __le16 s_reserved_for_journal; /* size in blocks of journal area on main
158 * device, we need to keep after 158 * device, we need to keep after
159 * making fs with non-standard journal */ 159 * making fs with non-standard journal */
160} __attribute__ ((__packed__)); 160} __attribute__ ((__packed__));
@@ -165,8 +165,8 @@ struct reiserfs_super_block_v1
165struct reiserfs_super_block 165struct reiserfs_super_block
166{ 166{
167 struct reiserfs_super_block_v1 s_v1; 167 struct reiserfs_super_block_v1 s_v1;
168 __u32 s_inode_generation; 168 __le32 s_inode_generation;
169 __u32 s_flags; /* Right now used only by inode-attributes, if enabled */ 169 __le32 s_flags; /* Right now used only by inode-attributes, if enabled */
170 unsigned char s_uuid[16]; /* filesystem unique identifier */ 170 unsigned char s_uuid[16]; /* filesystem unique identifier */
171 unsigned char s_label[16]; /* filesystem volume label */ 171 unsigned char s_label[16]; /* filesystem volume label */
172 char s_unused[88] ; /* zero filled by mkreiserfs and 172 char s_unused[88] ; /* zero filled by mkreiserfs and
@@ -225,7 +225,7 @@ struct reiserfs_super_block
225#define SB_ONDISK_JOURNAL_DEVICE(s) \ 225#define SB_ONDISK_JOURNAL_DEVICE(s) \
226 le32_to_cpu ((SB_ONDISK_JP(s)->jp_journal_dev)) 226 le32_to_cpu ((SB_ONDISK_JP(s)->jp_journal_dev))
227#define SB_ONDISK_RESERVED_FOR_JOURNAL(s) \ 227#define SB_ONDISK_RESERVED_FOR_JOURNAL(s) \
228 le32_to_cpu ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal)) 228 le16_to_cpu ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal))
229 229
230#define is_block_in_log_or_reserved_area(s, block) \ 230#define is_block_in_log_or_reserved_area(s, block) \
231 block >= SB_JOURNAL_1st_RESERVED_BLOCK(s) \ 231 block >= SB_JOURNAL_1st_RESERVED_BLOCK(s) \
@@ -269,7 +269,7 @@ int is_reiserfs_jr (struct reiserfs_super_block * rs);
269#define QUOTA_EXCEEDED -6 269#define QUOTA_EXCEEDED -6
270 270
271typedef __u32 b_blocknr_t; 271typedef __u32 b_blocknr_t;
272typedef __u32 unp_t; 272typedef __le32 unp_t;
273 273
274struct unfm_nodeinfo { 274struct unfm_nodeinfo {
275 unp_t unfm_nodenum; 275 unp_t unfm_nodenum;
@@ -376,78 +376,57 @@ static inline struct reiserfs_sb_info *REISERFS_SB(const struct super_block *sb)
376// directories use this key as well as old files 376// directories use this key as well as old files
377// 377//
378struct offset_v1 { 378struct offset_v1 {
379 __u32 k_offset; 379 __le32 k_offset;
380 __u32 k_uniqueness; 380 __le32 k_uniqueness;
381} __attribute__ ((__packed__)); 381} __attribute__ ((__packed__));
382 382
383struct offset_v2 { 383struct offset_v2 {
384#ifdef __LITTLE_ENDIAN 384 __le64 v;
385 /* little endian version */
386 __u64 k_offset:60;
387 __u64 k_type: 4;
388#else
389 /* big endian version */
390 __u64 k_type: 4;
391 __u64 k_offset:60;
392#endif
393} __attribute__ ((__packed__)); 385} __attribute__ ((__packed__));
394 386
395#ifndef __LITTLE_ENDIAN
396typedef union {
397 struct offset_v2 offset_v2;
398 __u64 linear;
399} __attribute__ ((__packed__)) offset_v2_esafe_overlay;
400
401static inline __u16 offset_v2_k_type( const struct offset_v2 *v2 ) 387static inline __u16 offset_v2_k_type( const struct offset_v2 *v2 )
402{ 388{
403 offset_v2_esafe_overlay tmp = *(const offset_v2_esafe_overlay *)v2; 389 __u8 type = le64_to_cpu(v2->v) >> 60;
404 tmp.linear = le64_to_cpu( tmp.linear ); 390 return (type <= TYPE_MAXTYPE)?type:TYPE_ANY;
405 return (tmp.offset_v2.k_type <= TYPE_MAXTYPE)?tmp.offset_v2.k_type:TYPE_ANY;
406} 391}
407 392
408static inline void set_offset_v2_k_type( struct offset_v2 *v2, int type ) 393static inline void set_offset_v2_k_type( struct offset_v2 *v2, int type )
409{ 394{
410 offset_v2_esafe_overlay *tmp = (offset_v2_esafe_overlay *)v2; 395 v2->v = (v2->v & cpu_to_le64(~0ULL>>4)) | cpu_to_le64((__u64)type<<60);
411 tmp->linear = le64_to_cpu(tmp->linear);
412 tmp->offset_v2.k_type = type;
413 tmp->linear = cpu_to_le64(tmp->linear);
414} 396}
415 397
416static inline loff_t offset_v2_k_offset( const struct offset_v2 *v2 ) 398static inline loff_t offset_v2_k_offset( const struct offset_v2 *v2 )
417{ 399{
418 offset_v2_esafe_overlay tmp = *(const offset_v2_esafe_overlay *)v2; 400 return le64_to_cpu(v2->v) & (~0ULL>>4);
419 tmp.linear = le64_to_cpu( tmp.linear );
420 return tmp.offset_v2.k_offset;
421} 401}
422 402
423static inline void set_offset_v2_k_offset( struct offset_v2 *v2, loff_t offset ){ 403static inline void set_offset_v2_k_offset( struct offset_v2 *v2, loff_t offset ){
424 offset_v2_esafe_overlay *tmp = (offset_v2_esafe_overlay *)v2; 404 offset &= (~0ULL>>4);
425 tmp->linear = le64_to_cpu(tmp->linear); 405 v2->v = (v2->v & cpu_to_le64(15ULL<<60)) | cpu_to_le64(offset);
426 tmp->offset_v2.k_offset = offset;
427 tmp->linear = cpu_to_le64(tmp->linear);
428} 406}
429#else
430# define offset_v2_k_type(v2) ((v2)->k_type)
431# define set_offset_v2_k_type(v2,val) (offset_v2_k_type(v2) = (val))
432# define offset_v2_k_offset(v2) ((v2)->k_offset)
433# define set_offset_v2_k_offset(v2,val) (offset_v2_k_offset(v2) = (val))
434#endif
435 407
436/* Key of an item determines its location in the S+tree, and 408/* Key of an item determines its location in the S+tree, and
437 is composed of 4 components */ 409 is composed of 4 components */
438struct reiserfs_key { 410struct reiserfs_key {
439 __u32 k_dir_id; /* packing locality: by default parent 411 __le32 k_dir_id; /* packing locality: by default parent
440 directory object id */ 412 directory object id */
441 __u32 k_objectid; /* object identifier */ 413 __le32 k_objectid; /* object identifier */
442 union { 414 union {
443 struct offset_v1 k_offset_v1; 415 struct offset_v1 k_offset_v1;
444 struct offset_v2 k_offset_v2; 416 struct offset_v2 k_offset_v2;
445 } __attribute__ ((__packed__)) u; 417 } __attribute__ ((__packed__)) u;
446} __attribute__ ((__packed__)); 418} __attribute__ ((__packed__));
447 419
420struct in_core_key {
421 __u32 k_dir_id; /* packing locality: by default parent
422 directory object id */
423 __u32 k_objectid; /* object identifier */
424 __u64 k_offset;
425 __u8 k_type;
426};
448 427
449struct cpu_key { 428struct cpu_key {
450 struct reiserfs_key on_disk_key; 429 struct in_core_key on_disk_key;
451 int version; 430 int version;
452 int key_length; /* 3 in all cases but direct2indirect and 431 int key_length; /* 3 in all cases but direct2indirect and
453 indirect2direct conversion */ 432 indirect2direct conversion */
@@ -508,15 +487,15 @@ struct item_head
508 item. Note that the key, not this field, is used to 487 item. Note that the key, not this field, is used to
509 determine the item type, and thus which field this 488 determine the item type, and thus which field this
510 union contains. */ 489 union contains. */
511 __u16 ih_free_space_reserved; 490 __le16 ih_free_space_reserved;
512 /* Iff this is a directory item, this field equals the 491 /* Iff this is a directory item, this field equals the
513 number of directory entries in the directory item. */ 492 number of directory entries in the directory item. */
514 __u16 ih_entry_count; 493 __le16 ih_entry_count;
515 } __attribute__ ((__packed__)) u; 494 } __attribute__ ((__packed__)) u;
516 __u16 ih_item_len; /* total size of the item body */ 495 __le16 ih_item_len; /* total size of the item body */
517 __u16 ih_item_location; /* an offset to the item body 496 __le16 ih_item_location; /* an offset to the item body
518 * within the block */ 497 * within the block */
519 __u16 ih_version; /* 0 for all old items, 2 for new 498 __le16 ih_version; /* 0 for all old items, 2 for new
520 ones. Highest bit is set by fsck 499 ones. Highest bit is set by fsck
521 temporary, cleaned after all 500 temporary, cleaned after all
522 done */ 501 done */
@@ -670,43 +649,29 @@ static inline void set_le_ih_k_type (struct item_head * ih, int type)
670// 649//
671static inline loff_t cpu_key_k_offset (const struct cpu_key * key) 650static inline loff_t cpu_key_k_offset (const struct cpu_key * key)
672{ 651{
673 return (key->version == KEY_FORMAT_3_5) ? 652 return key->on_disk_key.k_offset;
674 key->on_disk_key.u.k_offset_v1.k_offset :
675 key->on_disk_key.u.k_offset_v2.k_offset;
676} 653}
677 654
678static inline loff_t cpu_key_k_type (const struct cpu_key * key) 655static inline loff_t cpu_key_k_type (const struct cpu_key * key)
679{ 656{
680 return (key->version == KEY_FORMAT_3_5) ? 657 return key->on_disk_key.k_type;
681 uniqueness2type (key->on_disk_key.u.k_offset_v1.k_uniqueness) :
682 key->on_disk_key.u.k_offset_v2.k_type;
683} 658}
684 659
685static inline void set_cpu_key_k_offset (struct cpu_key * key, loff_t offset) 660static inline void set_cpu_key_k_offset (struct cpu_key * key, loff_t offset)
686{ 661{
687 (key->version == KEY_FORMAT_3_5) ? 662 key->on_disk_key.k_offset = offset;
688 (key->on_disk_key.u.k_offset_v1.k_offset = offset) :
689 (key->on_disk_key.u.k_offset_v2.k_offset = offset);
690} 663}
691 664
692
693static inline void set_cpu_key_k_type (struct cpu_key * key, int type) 665static inline void set_cpu_key_k_type (struct cpu_key * key, int type)
694{ 666{
695 (key->version == KEY_FORMAT_3_5) ? 667 key->on_disk_key.k_type = type;
696 (key->on_disk_key.u.k_offset_v1.k_uniqueness = type2uniqueness (type)):
697 (key->on_disk_key.u.k_offset_v2.k_type = type);
698} 668}
699 669
700
701static inline void cpu_key_k_offset_dec (struct cpu_key * key) 670static inline void cpu_key_k_offset_dec (struct cpu_key * key)
702{ 671{
703 if (key->version == KEY_FORMAT_3_5) 672 key->on_disk_key.k_offset --;
704 key->on_disk_key.u.k_offset_v1.k_offset --;
705 else
706 key->on_disk_key.u.k_offset_v2.k_offset --;
707} 673}
708 674
709
710#define is_direntry_cpu_key(key) (cpu_key_k_type (key) == TYPE_DIRENTRY) 675#define is_direntry_cpu_key(key) (cpu_key_k_type (key) == TYPE_DIRENTRY)
711#define is_direct_cpu_key(key) (cpu_key_k_type (key) == TYPE_DIRECT) 676#define is_direct_cpu_key(key) (cpu_key_k_type (key) == TYPE_DIRECT)
712#define is_indirect_cpu_key(key) (cpu_key_k_type (key) == TYPE_INDIRECT) 677#define is_indirect_cpu_key(key) (cpu_key_k_type (key) == TYPE_INDIRECT)
@@ -752,10 +717,10 @@ extern struct reiserfs_key root_key;
752/* Header of a disk block. More precisely, header of a formatted leaf 717/* Header of a disk block. More precisely, header of a formatted leaf
753 or internal node, and not the header of an unformatted node. */ 718 or internal node, and not the header of an unformatted node. */
754struct block_head { 719struct block_head {
755 __u16 blk_level; /* Level of a block in the tree. */ 720 __le16 blk_level; /* Level of a block in the tree. */
756 __u16 blk_nr_item; /* Number of keys/items in a block. */ 721 __le16 blk_nr_item; /* Number of keys/items in a block. */
757 __u16 blk_free_space; /* Block free space in bytes. */ 722 __le16 blk_free_space; /* Block free space in bytes. */
758 __u16 blk_reserved; 723 __le16 blk_reserved;
759 /* dump this in v4/planA */ 724 /* dump this in v4/planA */
760 struct reiserfs_key blk_right_delim_key; /* kept only for compatibility */ 725 struct reiserfs_key blk_right_delim_key; /* kept only for compatibility */
761}; 726};
@@ -819,19 +784,19 @@ struct block_head {
819// 784//
820struct stat_data_v1 785struct stat_data_v1
821{ 786{
822 __u16 sd_mode; /* file type, permissions */ 787 __le16 sd_mode; /* file type, permissions */
823 __u16 sd_nlink; /* number of hard links */ 788 __le16 sd_nlink; /* number of hard links */
824 __u16 sd_uid; /* owner */ 789 __le16 sd_uid; /* owner */
825 __u16 sd_gid; /* group */ 790 __le16 sd_gid; /* group */
826 __u32 sd_size; /* file size */ 791 __le32 sd_size; /* file size */
827 __u32 sd_atime; /* time of last access */ 792 __le32 sd_atime; /* time of last access */
828 __u32 sd_mtime; /* time file was last modified */ 793 __le32 sd_mtime; /* time file was last modified */
829 __u32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */ 794 __le32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */
830 union { 795 union {
831 __u32 sd_rdev; 796 __le32 sd_rdev;
832 __u32 sd_blocks; /* number of blocks file uses */ 797 __le32 sd_blocks; /* number of blocks file uses */
833 } __attribute__ ((__packed__)) u; 798 } __attribute__ ((__packed__)) u;
834 __u32 sd_first_direct_byte; /* first byte of file which is stored 799 __le32 sd_first_direct_byte; /* first byte of file which is stored
835 in a direct item: except that if it 800 in a direct item: except that if it
836 equals 1 it is a symlink and if it 801 equals 1 it is a symlink and if it
837 equals ~(__u32)0 there is no 802 equals ~(__u32)0 there is no
@@ -897,20 +862,20 @@ struct stat_data_v1
897/* Stat Data on disk (reiserfs version of UFS disk inode minus the 862/* Stat Data on disk (reiserfs version of UFS disk inode minus the
898 address blocks) */ 863 address blocks) */
899struct stat_data { 864struct stat_data {
900 __u16 sd_mode; /* file type, permissions */ 865 __le16 sd_mode; /* file type, permissions */
901 __u16 sd_attrs; /* persistent inode flags */ 866 __le16 sd_attrs; /* persistent inode flags */
902 __u32 sd_nlink; /* number of hard links */ 867 __le32 sd_nlink; /* number of hard links */
903 __u64 sd_size; /* file size */ 868 __le64 sd_size; /* file size */
904 __u32 sd_uid; /* owner */ 869 __le32 sd_uid; /* owner */
905 __u32 sd_gid; /* group */ 870 __le32 sd_gid; /* group */
906 __u32 sd_atime; /* time of last access */ 871 __le32 sd_atime; /* time of last access */
907 __u32 sd_mtime; /* time file was last modified */ 872 __le32 sd_mtime; /* time file was last modified */
908 __u32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */ 873 __le32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */
909 __u32 sd_blocks; 874 __le32 sd_blocks;
910 union { 875 union {
911 __u32 sd_rdev; 876 __le32 sd_rdev;
912 __u32 sd_generation; 877 __le32 sd_generation;
913 //__u32 sd_first_direct_byte; 878 //__le32 sd_first_direct_byte;
914 /* first byte of file which is stored in a 879 /* first byte of file which is stored in a
915 direct item: except that if it equals 1 880 direct item: except that if it equals 1
916 it is a symlink and if it equals 881 it is a symlink and if it equals
@@ -993,12 +958,12 @@ struct stat_data {
993 958
994struct reiserfs_de_head 959struct reiserfs_de_head
995{ 960{
996 __u32 deh_offset; /* third component of the directory entry key */ 961 __le32 deh_offset; /* third component of the directory entry key */
997 __u32 deh_dir_id; /* objectid of the parent directory of the object, that is referenced 962 __le32 deh_dir_id; /* objectid of the parent directory of the object, that is referenced
998 by directory entry */ 963 by directory entry */
999 __u32 deh_objectid; /* objectid of the object, that is referenced by directory entry */ 964 __le32 deh_objectid; /* objectid of the object, that is referenced by directory entry */
1000 __u16 deh_location; /* offset of name in the whole item */ 965 __le16 deh_location; /* offset of name in the whole item */
1001 __u16 deh_state; /* whether 1) entry contains stat data (for future), and 2) whether 966 __le16 deh_state; /* whether 1) entry contains stat data (for future), and 2) whether
1002 entry is hidden (unlinked) */ 967 entry is hidden (unlinked) */
1003} __attribute__ ((__packed__)); 968} __attribute__ ((__packed__));
1004#define DEH_SIZE sizeof(struct reiserfs_de_head) 969#define DEH_SIZE sizeof(struct reiserfs_de_head)
@@ -1058,10 +1023,10 @@ struct reiserfs_de_head
1058#define de_visible(deh) test_bit_unaligned (DEH_Visible, &((deh)->deh_state)) 1023#define de_visible(deh) test_bit_unaligned (DEH_Visible, &((deh)->deh_state))
1059#define de_hidden(deh) !test_bit_unaligned (DEH_Visible, &((deh)->deh_state)) 1024#define de_hidden(deh) !test_bit_unaligned (DEH_Visible, &((deh)->deh_state))
1060 1025
1061extern void make_empty_dir_item_v1 (char * body, __u32 dirid, __u32 objid, 1026extern void make_empty_dir_item_v1 (char * body, __le32 dirid, __le32 objid,
1062 __u32 par_dirid, __u32 par_objid); 1027 __le32 par_dirid, __le32 par_objid);
1063extern void make_empty_dir_item (char * body, __u32 dirid, __u32 objid, 1028extern void make_empty_dir_item (char * body, __le32 dirid, __le32 objid,
1064 __u32 par_dirid, __u32 par_objid); 1029 __le32 par_dirid, __le32 par_objid);
1065 1030
1066/* array of the entry headers */ 1031/* array of the entry headers */
1067 /* get item body */ 1032 /* get item body */
@@ -1160,9 +1125,9 @@ struct reiserfs_dir_entry
1160/* Disk child pointer: The pointer from an internal node of the tree 1125/* Disk child pointer: The pointer from an internal node of the tree
1161 to a node that is on disk. */ 1126 to a node that is on disk. */
1162struct disk_child { 1127struct disk_child {
1163 __u32 dc_block_number; /* Disk child's block number. */ 1128 __le32 dc_block_number; /* Disk child's block number. */
1164 __u16 dc_size; /* Disk child's used space. */ 1129 __le16 dc_size; /* Disk child's used space. */
1165 __u16 dc_reserved; 1130 __le16 dc_reserved;
1166}; 1131};
1167 1132
1168#define DC_SIZE (sizeof(struct disk_child)) 1133#define DC_SIZE (sizeof(struct disk_child))
@@ -1476,7 +1441,7 @@ struct tree_balance
1476 int fs_gen; /* saved value of `reiserfs_generation' counter 1441 int fs_gen; /* saved value of `reiserfs_generation' counter
1477 see FILESYSTEM_CHANGED() macro in reiserfs_fs.h */ 1442 see FILESYSTEM_CHANGED() macro in reiserfs_fs.h */
1478#ifdef DISPLACE_NEW_PACKING_LOCALITIES 1443#ifdef DISPLACE_NEW_PACKING_LOCALITIES
1479 struct reiserfs_key key; /* key pointer, to pass to block allocator or 1444 struct in_core_key key; /* key pointer, to pass to block allocator or
1480 another low-level subsystem */ 1445 another low-level subsystem */
1481#endif 1446#endif
1482} ; 1447} ;
@@ -1630,10 +1595,10 @@ struct reiserfs_iget_args {
1630 1595
1631/* first block written in a commit. */ 1596/* first block written in a commit. */
1632struct reiserfs_journal_desc { 1597struct reiserfs_journal_desc {
1633 __u32 j_trans_id ; /* id of commit */ 1598 __le32 j_trans_id ; /* id of commit */
1634 __u32 j_len ; /* length of commit. len +1 is the commit block */ 1599 __le32 j_len ; /* length of commit. len +1 is the commit block */
1635 __u32 j_mount_id ; /* mount id of this trans*/ 1600 __le32 j_mount_id ; /* mount id of this trans*/
1636 __u32 j_realblock[1] ; /* real locations for each block */ 1601 __le32 j_realblock[1] ; /* real locations for each block */
1637} ; 1602} ;
1638 1603
1639#define get_desc_trans_id(d) le32_to_cpu((d)->j_trans_id) 1604#define get_desc_trans_id(d) le32_to_cpu((d)->j_trans_id)
@@ -1646,9 +1611,9 @@ struct reiserfs_journal_desc {
1646 1611
1647/* last block written in a commit */ 1612/* last block written in a commit */
1648struct reiserfs_journal_commit { 1613struct reiserfs_journal_commit {
1649 __u32 j_trans_id ; /* must match j_trans_id from the desc block */ 1614 __le32 j_trans_id ; /* must match j_trans_id from the desc block */
1650 __u32 j_len ; /* ditto */ 1615 __le32 j_len ; /* ditto */
1651 __u32 j_realblock[1] ; /* real locations for each block */ 1616 __le32 j_realblock[1] ; /* real locations for each block */
1652} ; 1617} ;
1653 1618
1654#define get_commit_trans_id(c) le32_to_cpu((c)->j_trans_id) 1619#define get_commit_trans_id(c) le32_to_cpu((c)->j_trans_id)
@@ -1663,9 +1628,9 @@ struct reiserfs_journal_commit {
1663** and this transaction does not need to be replayed. 1628** and this transaction does not need to be replayed.
1664*/ 1629*/
1665struct reiserfs_journal_header { 1630struct reiserfs_journal_header {
1666 __u32 j_last_flush_trans_id ; /* id of last fully flushed transaction */ 1631 __le32 j_last_flush_trans_id ; /* id of last fully flushed transaction */
1667 __u32 j_first_unflushed_offset ; /* offset in the log of where to start replay after a crash */ 1632 __le32 j_first_unflushed_offset ; /* offset in the log of where to start replay after a crash */
1668 __u32 j_mount_id ; 1633 __le32 j_mount_id ;
1669 /* 12 */ struct journal_params jh_journal; 1634 /* 12 */ struct journal_params jh_journal;
1670} ; 1635} ;
1671 1636
@@ -2117,7 +2082,7 @@ struct buffer_head * get_FEB (struct tree_balance *);
2117 struct __reiserfs_blocknr_hint { 2082 struct __reiserfs_blocknr_hint {
2118 struct inode * inode; /* inode passed to allocator, if we allocate unf. nodes */ 2083 struct inode * inode; /* inode passed to allocator, if we allocate unf. nodes */
2119 long block; /* file offset, in blocks */ 2084 long block; /* file offset, in blocks */
2120 struct reiserfs_key key; 2085 struct in_core_key key;
2121 struct path * path; /* search path, used by allocator to deternine search_start by 2086 struct path * path; /* search path, used by allocator to deternine search_start by
2122 * various ways */ 2087 * various ways */
2123 struct reiserfs_transaction_handle * th; /* transaction handle is needed to log super blocks and 2088 struct reiserfs_transaction_handle * th; /* transaction handle is needed to log super blocks and
@@ -2144,7 +2109,7 @@ void reiserfs_init_alloc_options (struct super_block *s);
2144 * to use for a new object underneat it. The locality is returned 2109 * to use for a new object underneat it. The locality is returned
2145 * in disk byte order (le). 2110 * in disk byte order (le).
2146 */ 2111 */
2147u32 reiserfs_choose_packing(struct inode *dir); 2112__le32 reiserfs_choose_packing(struct inode *dir);
2148 2113
2149int is_reusable (struct super_block * s, b_blocknr_t block, int bit_value); 2114int is_reusable (struct super_block * s, b_blocknr_t block, int bit_value);
2150void reiserfs_free_block (struct reiserfs_transaction_handle *th, struct inode *, b_blocknr_t, int for_unformatted); 2115void reiserfs_free_block (struct reiserfs_transaction_handle *th, struct inode *, b_blocknr_t, int for_unformatted);