From 8dcabd9337d0520b54df742a2dc3e9810540397c Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Mon, 23 Jun 2008 13:23:32 +1000 Subject: [PATCH] --- yaml --- r: 107436 b: refs/heads/master c: ae23a5e87dbbf4657a82e1ff8ebc52ab50361c14 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/xfs/linux-2.6/xfs_linux.h | 7 +++++++ trunk/fs/xfs/xfs_dir2_sf.h | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index a96126832edc..519c75bce2b9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0ec585163ac81e329bde25fb6311a043a1c63952 +refs/heads/master: ae23a5e87dbbf4657a82e1ff8ebc52ab50361c14 diff --git a/trunk/fs/xfs/linux-2.6/xfs_linux.h b/trunk/fs/xfs/linux-2.6/xfs_linux.h index aded57321b12..4d45d9351a6c 100644 --- a/trunk/fs/xfs/linux-2.6/xfs_linux.h +++ b/trunk/fs/xfs/linux-2.6/xfs_linux.h @@ -300,4 +300,11 @@ static inline __uint64_t howmany_64(__uint64_t x, __uint32_t y) return x; } +/* ARM old ABI has some weird alignment/padding */ +#if defined(__arm__) && !defined(__ARM_EABI__) +#define __arch_pack __attribute__((packed)) +#else +#define __arch_pack +#endif + #endif /* __XFS_LINUX__ */ diff --git a/trunk/fs/xfs/xfs_dir2_sf.h b/trunk/fs/xfs/xfs_dir2_sf.h index 005629d702d2..deecc9d238f8 100644 --- a/trunk/fs/xfs/xfs_dir2_sf.h +++ b/trunk/fs/xfs/xfs_dir2_sf.h @@ -62,7 +62,7 @@ typedef union { * Normalized offset (in a data block) of the entry, really xfs_dir2_data_off_t. * Only need 16 bits, this is the byte offset into the single block form. */ -typedef struct { __uint8_t i[2]; } xfs_dir2_sf_off_t; +typedef struct { __uint8_t i[2]; } __arch_pack xfs_dir2_sf_off_t; /* * The parent directory has a dedicated field, and the self-pointer must @@ -76,14 +76,14 @@ typedef struct xfs_dir2_sf_hdr { __uint8_t count; /* count of entries */ __uint8_t i8count; /* count of 8-byte inode #s */ xfs_dir2_inou_t parent; /* parent dir inode number */ -} xfs_dir2_sf_hdr_t; +} __arch_pack xfs_dir2_sf_hdr_t; typedef struct xfs_dir2_sf_entry { __uint8_t namelen; /* actual name length */ xfs_dir2_sf_off_t offset; /* saved offset */ __uint8_t name[1]; /* name, variable size */ xfs_dir2_inou_t inumber; /* inode number, var. offset */ -} xfs_dir2_sf_entry_t; +} __arch_pack xfs_dir2_sf_entry_t; typedef struct xfs_dir2_sf { xfs_dir2_sf_hdr_t hdr; /* shortform header */