diff options
author | Christoph Hellwig <hch@infradead.org> | 2007-08-16 02:23:40 -0400 |
---|---|---|
committer | Tim Shimmin <tes@chook.melbourne.sgi.com> | 2007-10-15 02:25:51 -0400 |
commit | a6f64d4aea0d0c8483e910c7dd2d1ee48e42245c (patch) | |
tree | f3fb20bb6d816f6d674bd4c8bfa687b013443eaf /fs/xfs/xfs_bmap_btree.h | |
parent | d580ef6eaae6eaaef1e06c7d689fc9949faee9da (diff) |
[XFS] split ondisk vs incore versions of xfs_bmbt_rec_t
currently xfs_bmbt_rec_t is used both for ondisk extents as well as
host-endian ones. This patch adds a new xfs_bmbt_rec_host_t for the native
endian ones and cleans up the fallout. There have been various endianess
issues in the tracing / debug printf code that are fixed by this patch.
SGI-PV: 968563
SGI-Modid: xfs-linux-melb:xfs-kern:29318a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_bmap_btree.h')
-rw-r--r-- | fs/xfs/xfs_bmap_btree.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/fs/xfs/xfs_bmap_btree.h b/fs/xfs/xfs_bmap_btree.h index a77b1b753d0c..268289059022 100644 --- a/fs/xfs/xfs_bmap_btree.h +++ b/fs/xfs/xfs_bmap_btree.h | |||
@@ -89,6 +89,10 @@ typedef struct xfs_bmbt_rec_64 | |||
89 | typedef __uint64_t xfs_bmbt_rec_base_t; /* use this for casts */ | 89 | typedef __uint64_t xfs_bmbt_rec_base_t; /* use this for casts */ |
90 | typedef xfs_bmbt_rec_64_t xfs_bmbt_rec_t, xfs_bmdr_rec_t; | 90 | typedef xfs_bmbt_rec_64_t xfs_bmbt_rec_t, xfs_bmdr_rec_t; |
91 | 91 | ||
92 | typedef struct xfs_bmbt_rec_host { | ||
93 | __uint64_t l0, l1; | ||
94 | } xfs_bmbt_rec_host_t; | ||
95 | |||
92 | /* | 96 | /* |
93 | * Values and macros for delayed-allocation startblock fields. | 97 | * Values and macros for delayed-allocation startblock fields. |
94 | */ | 98 | */ |
@@ -281,13 +285,13 @@ extern ktrace_t *xfs_bmbt_trace_buf; | |||
281 | extern void xfs_bmdr_to_bmbt(xfs_bmdr_block_t *, int, xfs_bmbt_block_t *, int); | 285 | extern void xfs_bmdr_to_bmbt(xfs_bmdr_block_t *, int, xfs_bmbt_block_t *, int); |
282 | extern int xfs_bmbt_decrement(struct xfs_btree_cur *, int, int *); | 286 | extern int xfs_bmbt_decrement(struct xfs_btree_cur *, int, int *); |
283 | extern int xfs_bmbt_delete(struct xfs_btree_cur *, int *); | 287 | extern int xfs_bmbt_delete(struct xfs_btree_cur *, int *); |
284 | extern void xfs_bmbt_get_all(xfs_bmbt_rec_t *r, xfs_bmbt_irec_t *s); | 288 | extern void xfs_bmbt_get_all(xfs_bmbt_rec_host_t *r, xfs_bmbt_irec_t *s); |
285 | extern xfs_bmbt_block_t *xfs_bmbt_get_block(struct xfs_btree_cur *cur, | 289 | extern xfs_bmbt_block_t *xfs_bmbt_get_block(struct xfs_btree_cur *cur, |
286 | int, struct xfs_buf **bpp); | 290 | int, struct xfs_buf **bpp); |
287 | extern xfs_filblks_t xfs_bmbt_get_blockcount(xfs_bmbt_rec_t *r); | 291 | extern xfs_filblks_t xfs_bmbt_get_blockcount(xfs_bmbt_rec_host_t *r); |
288 | extern xfs_fsblock_t xfs_bmbt_get_startblock(xfs_bmbt_rec_t *r); | 292 | extern xfs_fsblock_t xfs_bmbt_get_startblock(xfs_bmbt_rec_host_t *r); |
289 | extern xfs_fileoff_t xfs_bmbt_get_startoff(xfs_bmbt_rec_t *r); | 293 | extern xfs_fileoff_t xfs_bmbt_get_startoff(xfs_bmbt_rec_host_t *r); |
290 | extern xfs_exntst_t xfs_bmbt_get_state(xfs_bmbt_rec_t *r); | 294 | extern xfs_exntst_t xfs_bmbt_get_state(xfs_bmbt_rec_host_t *r); |
291 | 295 | ||
292 | #ifndef XFS_NATIVE_HOST | 296 | #ifndef XFS_NATIVE_HOST |
293 | extern void xfs_bmbt_disk_get_all(xfs_bmbt_rec_t *r, xfs_bmbt_irec_t *s); | 297 | extern void xfs_bmbt_disk_get_all(xfs_bmbt_rec_t *r, xfs_bmbt_irec_t *s); |
@@ -315,13 +319,13 @@ extern int xfs_bmbt_lookup_ge(struct xfs_btree_cur *, xfs_fileoff_t, | |||
315 | */ | 319 | */ |
316 | extern int xfs_bmbt_newroot(struct xfs_btree_cur *cur, int *lflags, int *stat); | 320 | extern int xfs_bmbt_newroot(struct xfs_btree_cur *cur, int *lflags, int *stat); |
317 | 321 | ||
318 | extern void xfs_bmbt_set_all(xfs_bmbt_rec_t *r, xfs_bmbt_irec_t *s); | 322 | extern void xfs_bmbt_set_all(xfs_bmbt_rec_host_t *r, xfs_bmbt_irec_t *s); |
319 | extern void xfs_bmbt_set_allf(xfs_bmbt_rec_t *r, xfs_fileoff_t o, | 323 | extern void xfs_bmbt_set_allf(xfs_bmbt_rec_host_t *r, xfs_fileoff_t o, |
320 | xfs_fsblock_t b, xfs_filblks_t c, xfs_exntst_t v); | 324 | xfs_fsblock_t b, xfs_filblks_t c, xfs_exntst_t v); |
321 | extern void xfs_bmbt_set_blockcount(xfs_bmbt_rec_t *r, xfs_filblks_t v); | 325 | extern void xfs_bmbt_set_blockcount(xfs_bmbt_rec_host_t *r, xfs_filblks_t v); |
322 | extern void xfs_bmbt_set_startblock(xfs_bmbt_rec_t *r, xfs_fsblock_t v); | 326 | extern void xfs_bmbt_set_startblock(xfs_bmbt_rec_host_t *r, xfs_fsblock_t v); |
323 | extern void xfs_bmbt_set_startoff(xfs_bmbt_rec_t *r, xfs_fileoff_t v); | 327 | extern void xfs_bmbt_set_startoff(xfs_bmbt_rec_host_t *r, xfs_fileoff_t v); |
324 | extern void xfs_bmbt_set_state(xfs_bmbt_rec_t *r, xfs_exntst_t v); | 328 | extern void xfs_bmbt_set_state(xfs_bmbt_rec_host_t *r, xfs_exntst_t v); |
325 | 329 | ||
326 | #ifndef XFS_NATIVE_HOST | 330 | #ifndef XFS_NATIVE_HOST |
327 | extern void xfs_bmbt_disk_set_all(xfs_bmbt_rec_t *r, xfs_bmbt_irec_t *s); | 331 | extern void xfs_bmbt_disk_set_all(xfs_bmbt_rec_t *r, xfs_bmbt_irec_t *s); |