aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2_leaf.h
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-23 23:44:19 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-23 23:44:19 -0500
commit1ebbe2b20091d306453a5cf480a87e6cd28ae76f (patch)
treef5cd7a0fa69b8b1938cb5a0faed2e7b0628072a5 /fs/xfs/xfs_dir2_leaf.h
parentac58c9059da8886b5e8cde012a80266b18ca146e (diff)
parent674a396c6d2ba0341ebdd7c1c9950f32f018e2dd (diff)
Merge branch 'linus'
Diffstat (limited to 'fs/xfs/xfs_dir2_leaf.h')
-rw-r--r--fs/xfs/xfs_dir2_leaf.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/xfs/xfs_dir2_leaf.h b/fs/xfs/xfs_dir2_leaf.h
index 1393993d61e9..f57ca1162412 100644
--- a/fs/xfs/xfs_dir2_leaf.h
+++ b/fs/xfs/xfs_dir2_leaf.h
@@ -46,23 +46,23 @@ typedef __uint32_t xfs_dir2_dataptr_t;
46 */ 46 */
47typedef struct xfs_dir2_leaf_hdr { 47typedef struct xfs_dir2_leaf_hdr {
48 xfs_da_blkinfo_t info; /* header for da routines */ 48 xfs_da_blkinfo_t info; /* header for da routines */
49 __uint16_t count; /* count of entries */ 49 __be16 count; /* count of entries */
50 __uint16_t stale; /* count of stale entries */ 50 __be16 stale; /* count of stale entries */
51} xfs_dir2_leaf_hdr_t; 51} xfs_dir2_leaf_hdr_t;
52 52
53/* 53/*
54 * Leaf block entry. 54 * Leaf block entry.
55 */ 55 */
56typedef struct xfs_dir2_leaf_entry { 56typedef struct xfs_dir2_leaf_entry {
57 xfs_dahash_t hashval; /* hash value of name */ 57 __be32 hashval; /* hash value of name */
58 xfs_dir2_dataptr_t address; /* address of data entry */ 58 __be32 address; /* address of data entry */
59} xfs_dir2_leaf_entry_t; 59} xfs_dir2_leaf_entry_t;
60 60
61/* 61/*
62 * Leaf block tail. 62 * Leaf block tail.
63 */ 63 */
64typedef struct xfs_dir2_leaf_tail { 64typedef struct xfs_dir2_leaf_tail {
65 __uint32_t bestcount; 65 __be32 bestcount;
66} xfs_dir2_leaf_tail_t; 66} xfs_dir2_leaf_tail_t;
67 67
68/* 68/*
@@ -105,11 +105,10 @@ xfs_dir2_leaf_tail_p(struct xfs_mount *mp, xfs_dir2_leaf_t *lp)
105 * Get address of the bests array in the single-leaf block. 105 * Get address of the bests array in the single-leaf block.
106 */ 106 */
107#define XFS_DIR2_LEAF_BESTS_P(ltp) xfs_dir2_leaf_bests_p(ltp) 107#define XFS_DIR2_LEAF_BESTS_P(ltp) xfs_dir2_leaf_bests_p(ltp)
108static inline xfs_dir2_data_off_t * 108static inline __be16 *
109xfs_dir2_leaf_bests_p(xfs_dir2_leaf_tail_t *ltp) 109xfs_dir2_leaf_bests_p(xfs_dir2_leaf_tail_t *ltp)
110{ 110{
111 return (xfs_dir2_data_off_t *) 111 return (__be16 *)ltp - be32_to_cpu(ltp->bestcount);
112 (ltp) - INT_GET((ltp)->bestcount, ARCH_CONVERT);
113} 112}
114 113
115/* 114/*