[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#414932: Info received (Bug#414932: linux-image-2.6.18-4-ixp4xx: xfs partition from x86 system can not be used on arm)

On Fri, Apr 27, 2007 at 08:26:10AM -0500, Eric Sandeen wrote:

> >Yep.  Padding rules on old-ABI ARM systems are 'special', but still
> >spec-compliant.  See:
> Thanks, I've read up a bit since, and I think I grok it now :)
> So, adding __attribute__((packed)) to xfs_dir2_sf_off_t, 
> xfs_dir2_sf_hdr_t, and perhaps also xfs_dir2_sf_entry_t might fix things?

It might, but it would likely also reduce performance on other platforms.

I.e. on platforms that can't do unaligned accesses, if you access,
say, an unsigned long long via a pointer to a struct that is
__attribute__((packed)), the compiler might end up emitting 8 individual
byte accesses, and combining those values together into a long long by

You'd probably want to do something like:

	#if defined(__arm__) && !defined(__ARM_EABI__)
	#define PACKED __attribute__((packed))
	#define PACKED

	typedef struct {
		int foo;
		char bar;
		long baz;

Or something like that.

> The xfstest suite is pretty good, if anyone would like to run
> through it on arm with the above packed structures...

I'll have a look.

Reply to: