Loading fs/xfs/xfs_arch.h +14 −8 Original line number Diff line number Diff line Loading @@ -40,22 +40,28 @@ #include <asm/byteorder.h> #ifdef __LITTLE_ENDIAN # define __BYTE_ORDER __LITTLE_ENDIAN #endif #ifdef __BIG_ENDIAN # define __BYTE_ORDER __BIG_ENDIAN #define XFS_NATIVE_HOST 1 #else #undef XFS_NATIVE_HOST #endif #else /* __KERNEL__ */ #if __BYTE_ORDER == __BIG_ENDIAN #define XFS_NATIVE_HOST 1 #else #undef XFS_NATIVE_HOST #endif #endif /* __KERNEL__ */ /* do we need conversion? */ #define ARCH_NOCONVERT 1 #if __BYTE_ORDER == __LITTLE_ENDIAN # define ARCH_CONVERT 0 #else #ifdef XFS_NATIVE_HOST # define ARCH_CONVERT ARCH_NOCONVERT #else # define ARCH_CONVERT 0 #endif /* generic swapping macros */ Loading fs/xfs/xfs_bmap_btree.c +4 −4 Original line number Diff line number Diff line Loading @@ -2017,7 +2017,7 @@ xfs_bmbt_get_state( ext_flag); } #if __BYTE_ORDER != __BIG_ENDIAN #ifndef XFS_NATIVE_HOST /* Endian flipping versions of the bmbt extraction functions */ void xfs_bmbt_disk_get_all( Loading Loading @@ -2087,7 +2087,7 @@ xfs_bmbt_disk_get_state( return xfs_extent_state(xfs_bmbt_disk_get_blockcount(r), ext_flag); } #endif #endif /* XFS_NATIVE_HOST */ /* Loading Loading @@ -2531,7 +2531,7 @@ xfs_bmbt_set_allf( #endif /* XFS_BIG_BLKNOS */ } #if __BYTE_ORDER != __BIG_ENDIAN #ifndef XFS_NATIVE_HOST /* * Set all the fields in a bmap extent record from the uncompressed form. */ Loading Loading @@ -2617,7 +2617,7 @@ xfs_bmbt_disk_set_allf( } #endif /* XFS_BIG_BLKNOS */ } #endif #endif /* XFS_NATIVE_HOST */ /* * Set the blockcount field in a bmap extent record. Loading fs/xfs/xfs_bmap_btree.h +6 −6 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ typedef struct xfs_bmdr_block * l1:0-20 are blockcount. */ #if __BYTE_ORDER == __LITTLE_ENDIAN #ifndef XFS_NATIVE_HOST #define BMBT_TOTAL_BITLEN 128 /* 128 bits, 16 bytes */ #define BMBT_EXNTFLAG_BITOFF 0 Loading @@ -87,7 +87,7 @@ typedef struct xfs_bmdr_block #define BMBT_BLOCKCOUNT_BITOFF 64 /* Start of second 64 bit container */ #define BMBT_BLOCKCOUNT_BITLEN 21 #endif #endif /* XFS_NATIVE_HOST */ #define BMBT_USE_64 1 Loading Loading @@ -505,7 +505,7 @@ xfs_exntst_t xfs_bmbt_get_state( xfs_bmbt_rec_t *r); #if __BYTE_ORDER != __BIG_ENDIAN #ifndef XFS_NATIVE_HOST void xfs_bmbt_disk_get_all( xfs_bmbt_rec_t *r, Loading Loading @@ -538,7 +538,7 @@ xfs_bmbt_disk_get_startoff( xfs_bmbt_get_blockcount(r) #define xfs_bmbt_disk_get_startoff(r) \ xfs_bmbt_get_startoff(r) #endif #endif /* XFS_NATIVE_HOST */ int xfs_bmbt_increment( Loading Loading @@ -623,7 +623,7 @@ xfs_bmbt_set_state( xfs_bmbt_rec_t *r, xfs_exntst_t v); #if __BYTE_ORDER != __BIG_ENDIAN #ifndef XFS_NATIVE_HOST void xfs_bmbt_disk_set_all( xfs_bmbt_rec_t *r, Loading @@ -641,7 +641,7 @@ xfs_bmbt_disk_set_allf( xfs_bmbt_set_all(r, s) #define xfs_bmbt_disk_set_allf(r, o, b, c, v) \ xfs_bmbt_set_allf(r, o, b, c, v) #endif #endif /* XFS_NATIVE_HOST */ void xfs_bmbt_to_bmdr( Loading fs/xfs/xfs_dir_leaf.h +3 −3 Original line number Diff line number Diff line Loading @@ -127,13 +127,13 @@ typedef union { * Watch the order here (endian-ness dependent). */ struct { #if __BYTE_ORDER == __LITTLE_ENDIAN #ifndef XFS_NATIVE_HOST xfs_dahash_t h; /* hash value */ __uint32_t be; /* block and entry */ #else /* __BYTE_ORDER == __BIG_ENDIAN */ #else __uint32_t be; /* block and entry */ xfs_dahash_t h; /* hash value */ #endif /* __BYTE_ORDER == __BIG_ENDIAN */ #endif /* XFS_NATIVE_HOST */ } s; } xfs_dircook_t; Loading fs/xfs/xfs_inode_item.c +2 −2 Original line number Diff line number Diff line Loading @@ -341,7 +341,7 @@ xfs_inode_item_format( nrecs = ip->i_df.if_bytes / (uint)sizeof(xfs_bmbt_rec_t); ASSERT(nrecs > 0); #if __BYTE_ORDER == __BIG_ENDIAN #ifdef XFS_NATIVE_HOST if (nrecs == ip->i_d.di_nextents) { /* * There are no delayed allocation Loading Loading @@ -473,7 +473,7 @@ xfs_inode_item_format( #endif ASSERT(nrecs > 0); ASSERT(nrecs == ip->i_d.di_anextents); #if __BYTE_ORDER == __BIG_ENDIAN #ifdef XFS_NATIVE_HOST /* * There are not delayed allocation extents * for attributes, so just point at the array. Loading Loading
fs/xfs/xfs_arch.h +14 −8 Original line number Diff line number Diff line Loading @@ -40,22 +40,28 @@ #include <asm/byteorder.h> #ifdef __LITTLE_ENDIAN # define __BYTE_ORDER __LITTLE_ENDIAN #endif #ifdef __BIG_ENDIAN # define __BYTE_ORDER __BIG_ENDIAN #define XFS_NATIVE_HOST 1 #else #undef XFS_NATIVE_HOST #endif #else /* __KERNEL__ */ #if __BYTE_ORDER == __BIG_ENDIAN #define XFS_NATIVE_HOST 1 #else #undef XFS_NATIVE_HOST #endif #endif /* __KERNEL__ */ /* do we need conversion? */ #define ARCH_NOCONVERT 1 #if __BYTE_ORDER == __LITTLE_ENDIAN # define ARCH_CONVERT 0 #else #ifdef XFS_NATIVE_HOST # define ARCH_CONVERT ARCH_NOCONVERT #else # define ARCH_CONVERT 0 #endif /* generic swapping macros */ Loading
fs/xfs/xfs_bmap_btree.c +4 −4 Original line number Diff line number Diff line Loading @@ -2017,7 +2017,7 @@ xfs_bmbt_get_state( ext_flag); } #if __BYTE_ORDER != __BIG_ENDIAN #ifndef XFS_NATIVE_HOST /* Endian flipping versions of the bmbt extraction functions */ void xfs_bmbt_disk_get_all( Loading Loading @@ -2087,7 +2087,7 @@ xfs_bmbt_disk_get_state( return xfs_extent_state(xfs_bmbt_disk_get_blockcount(r), ext_flag); } #endif #endif /* XFS_NATIVE_HOST */ /* Loading Loading @@ -2531,7 +2531,7 @@ xfs_bmbt_set_allf( #endif /* XFS_BIG_BLKNOS */ } #if __BYTE_ORDER != __BIG_ENDIAN #ifndef XFS_NATIVE_HOST /* * Set all the fields in a bmap extent record from the uncompressed form. */ Loading Loading @@ -2617,7 +2617,7 @@ xfs_bmbt_disk_set_allf( } #endif /* XFS_BIG_BLKNOS */ } #endif #endif /* XFS_NATIVE_HOST */ /* * Set the blockcount field in a bmap extent record. Loading
fs/xfs/xfs_bmap_btree.h +6 −6 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ typedef struct xfs_bmdr_block * l1:0-20 are blockcount. */ #if __BYTE_ORDER == __LITTLE_ENDIAN #ifndef XFS_NATIVE_HOST #define BMBT_TOTAL_BITLEN 128 /* 128 bits, 16 bytes */ #define BMBT_EXNTFLAG_BITOFF 0 Loading @@ -87,7 +87,7 @@ typedef struct xfs_bmdr_block #define BMBT_BLOCKCOUNT_BITOFF 64 /* Start of second 64 bit container */ #define BMBT_BLOCKCOUNT_BITLEN 21 #endif #endif /* XFS_NATIVE_HOST */ #define BMBT_USE_64 1 Loading Loading @@ -505,7 +505,7 @@ xfs_exntst_t xfs_bmbt_get_state( xfs_bmbt_rec_t *r); #if __BYTE_ORDER != __BIG_ENDIAN #ifndef XFS_NATIVE_HOST void xfs_bmbt_disk_get_all( xfs_bmbt_rec_t *r, Loading Loading @@ -538,7 +538,7 @@ xfs_bmbt_disk_get_startoff( xfs_bmbt_get_blockcount(r) #define xfs_bmbt_disk_get_startoff(r) \ xfs_bmbt_get_startoff(r) #endif #endif /* XFS_NATIVE_HOST */ int xfs_bmbt_increment( Loading Loading @@ -623,7 +623,7 @@ xfs_bmbt_set_state( xfs_bmbt_rec_t *r, xfs_exntst_t v); #if __BYTE_ORDER != __BIG_ENDIAN #ifndef XFS_NATIVE_HOST void xfs_bmbt_disk_set_all( xfs_bmbt_rec_t *r, Loading @@ -641,7 +641,7 @@ xfs_bmbt_disk_set_allf( xfs_bmbt_set_all(r, s) #define xfs_bmbt_disk_set_allf(r, o, b, c, v) \ xfs_bmbt_set_allf(r, o, b, c, v) #endif #endif /* XFS_NATIVE_HOST */ void xfs_bmbt_to_bmdr( Loading
fs/xfs/xfs_dir_leaf.h +3 −3 Original line number Diff line number Diff line Loading @@ -127,13 +127,13 @@ typedef union { * Watch the order here (endian-ness dependent). */ struct { #if __BYTE_ORDER == __LITTLE_ENDIAN #ifndef XFS_NATIVE_HOST xfs_dahash_t h; /* hash value */ __uint32_t be; /* block and entry */ #else /* __BYTE_ORDER == __BIG_ENDIAN */ #else __uint32_t be; /* block and entry */ xfs_dahash_t h; /* hash value */ #endif /* __BYTE_ORDER == __BIG_ENDIAN */ #endif /* XFS_NATIVE_HOST */ } s; } xfs_dircook_t; Loading
fs/xfs/xfs_inode_item.c +2 −2 Original line number Diff line number Diff line Loading @@ -341,7 +341,7 @@ xfs_inode_item_format( nrecs = ip->i_df.if_bytes / (uint)sizeof(xfs_bmbt_rec_t); ASSERT(nrecs > 0); #if __BYTE_ORDER == __BIG_ENDIAN #ifdef XFS_NATIVE_HOST if (nrecs == ip->i_d.di_nextents) { /* * There are no delayed allocation Loading Loading @@ -473,7 +473,7 @@ xfs_inode_item_format( #endif ASSERT(nrecs > 0); ASSERT(nrecs == ip->i_d.di_anextents); #if __BYTE_ORDER == __BIG_ENDIAN #ifdef XFS_NATIVE_HOST /* * There are not delayed allocation extents * for attributes, so just point at the array. Loading