aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/reiserfs_fs.h32
1 files changed, 29 insertions, 3 deletions
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index bccff8b17dc4..d0867873a1b5 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -433,6 +433,23 @@ static inline void set_offset_v2_k_offset( struct offset_v2 *v2, loff_t offset )
433# define set_offset_v2_k_offset(v2,val) (offset_v2_k_offset(v2) = (val)) 433# define set_offset_v2_k_offset(v2,val) (offset_v2_k_offset(v2) = (val))
434#endif 434#endif
435 435
436struct in_core_offset_v1 {
437 __u32 k_offset;
438 __u32 k_uniqueness;
439} __attribute__ ((__packed__));
440
441struct in_core_offset_v2 {
442#ifdef __LITTLE_ENDIAN
443 /* little endian version */
444 __u64 k_offset:60;
445 __u64 k_type: 4;
446#else
447 /* big endian version */
448 __u64 k_type: 4;
449 __u64 k_offset:60;
450#endif
451} __attribute__ ((__packed__));
452
436/* Key of an item determines its location in the S+tree, and 453/* Key of an item determines its location in the S+tree, and
437 is composed of 4 components */ 454 is composed of 4 components */
438struct reiserfs_key { 455struct reiserfs_key {
@@ -445,9 +462,18 @@ struct reiserfs_key {
445 } __attribute__ ((__packed__)) u; 462 } __attribute__ ((__packed__)) u;
446} __attribute__ ((__packed__)); 463} __attribute__ ((__packed__));
447 464
465struct in_core_key {
466 __u32 k_dir_id; /* packing locality: by default parent
467 directory object id */
468 __u32 k_objectid; /* object identifier */
469 union {
470 struct in_core_offset_v1 k_offset_v1;
471 struct in_core_offset_v2 k_offset_v2;
472 } __attribute__ ((__packed__)) u;
473} __attribute__ ((__packed__));
448 474
449struct cpu_key { 475struct cpu_key {
450 struct reiserfs_key on_disk_key; 476 struct in_core_key on_disk_key;
451 int version; 477 int version;
452 int key_length; /* 3 in all cases but direct2indirect and 478 int key_length; /* 3 in all cases but direct2indirect and
453 indirect2direct conversion */ 479 indirect2direct conversion */
@@ -1476,7 +1502,7 @@ struct tree_balance
1476 int fs_gen; /* saved value of `reiserfs_generation' counter 1502 int fs_gen; /* saved value of `reiserfs_generation' counter
1477 see FILESYSTEM_CHANGED() macro in reiserfs_fs.h */ 1503 see FILESYSTEM_CHANGED() macro in reiserfs_fs.h */
1478#ifdef DISPLACE_NEW_PACKING_LOCALITIES 1504#ifdef DISPLACE_NEW_PACKING_LOCALITIES
1479 struct reiserfs_key key; /* key pointer, to pass to block allocator or 1505 struct in_core_key key; /* key pointer, to pass to block allocator or
1480 another low-level subsystem */ 1506 another low-level subsystem */
1481#endif 1507#endif
1482} ; 1508} ;
@@ -2117,7 +2143,7 @@ struct buffer_head * get_FEB (struct tree_balance *);
2117 struct __reiserfs_blocknr_hint { 2143 struct __reiserfs_blocknr_hint {
2118 struct inode * inode; /* inode passed to allocator, if we allocate unf. nodes */ 2144 struct inode * inode; /* inode passed to allocator, if we allocate unf. nodes */
2119 long block; /* file offset, in blocks */ 2145 long block; /* file offset, in blocks */
2120 struct reiserfs_key key; 2146 struct in_core_key key;
2121 struct path * path; /* search path, used by allocator to deternine search_start by 2147 struct path * path; /* search path, used by allocator to deternine search_start by
2122 * various ways */ 2148 * various ways */
2123 struct reiserfs_transaction_handle * th; /* transaction handle is needed to log super blocks and 2149 struct reiserfs_transaction_handle * th; /* transaction handle is needed to log super blocks and