Commit d1b792b8 authored by Dave Kleikamp's avatar Dave Kleikamp

JFS: Fix structure alignment problem on 64-bit machines

The code in xtLog assumes that the structures xdlistlock_t and
maplock_t are the same size, as they are overlaid.  On 64-bit
machines, this was not the case.

Ensure that the xdlistlock_t is 16 bytes in length regardless of
the size of a pointer.
parent 3da9cf28
...@@ -251,10 +251,17 @@ typedef struct { ...@@ -251,10 +251,17 @@ typedef struct {
u8 count; /* 1: number of pxd/xad */ u8 count; /* 1: number of pxd/xad */
/* (8) */ /* (8) */
void *xdlist; /* 4: pxd/xad list */ /*
s32 rsrvd; /* 4: */ * We need xdlistlock_t to be 64 bits (8 bytes), regardless of
* whether void * is 32 or 64 bits
*/
union {
void *_xdlist; /* pxd/xad list */
s64 pad; /* 8: Force 64-bit xdlist size */
} union64;
} xdlistlock_t; /* (16): */ } xdlistlock_t; /* (16): */
#define xdlist union64._xdlist
/* /*
* commit * commit
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment