lkml.org 
[lkml]   [2008]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH-possible bugfix] xfs: ensure extents are read as be64
On Mon, Apr 14, 2008 at 08:28:51PM -0700, Harvey Harrison wrote:
> The debug code reads the extents in cpu-order rather than BE. Make the
> debug code match.

xfs_validate_extents() is reading in-core extents which have already
been byte-swapped when they were read into memory.

FWIW, when changing anything to do with endian conversion, please
ensure you run:

$ make C=2 CHECKFLAGS="-D__CHECK_ENDIAN__"

over the change. This change would introduce errors because:

typedef struct xfs_bmbt_rec_host {
__uint64_t l0, l1;
} xfs_bmbt_rec_host_t;

is not defined with __beXX types like the disk format version of this
structure which is:

typedef struct xfs_bmbt_rec_64 {
__be64 l0, l1;
} xfs_bmbt_rec_64_t;

Cheers,

Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group


\
 
 \ /
  Last update: 2008-04-15 07:01    [W:0.031 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site