On Wed, 2002-09-25 at 15:51, gmrincon@xxxxxxx wrote:
> Hi guys, I was trying to use XFS with Native little-endian on-disk format to
>
> eliminate current big endian/little endian conversions. I did the
> following
> step:
>
> 1.- Modify ../fs/xfs/xfs_arch.h (line 274)
> /* do we need conversion? */
>
> #define ARCH_NOCONVERT 1
> #if __BYTE_ORDER == __LITTLE_ENDIAN
> - #define ARCH_CONVERT ARCH_:CONVERT
> + #define ARCH_CONVERT ARCH_NOCONVERT
> #else
> #define ARCH_CONVERT ARCH_NOCONVERT
> #endif
>
> 2.- Compile the new kernel
> 3.- Creat a new xfsprogs RPMS, the xfs_arch.h file was changed with the
>
> previous patch.
> 4.- Install the kernel.
> 5.- Install the xfsprogs (Version with changes)
> 6.- Creat a FileSystem (mkfs -t xfs /dev/sdb2).
> 7.- Mount a FileSystem (mount -txfs /dev/sdb2 /disk0).
>
> The Hardware used was a Pentium III at 1Mhz, 1 Gbyte of RAM (Dell 1550
> Server)
>
> Result.
> creat filesystem was okay.
> Mount filesystem was okay.
> df -h command shows the right information.
> mkdir command works.
> cd command works (Change directory).
> cp files to the filesystem works.
> vi on a file works (read operation).
> ls does not show entries. (like filesystem empty, directory .
> and ..
> was not showed)
>
>
> Do i missing something? Or this is not the way to do it, I'm not a
> kernel
> expert, i just
> doing it for fun. Is any other way to achive this with XFS?
>
This is not something we have tried, it is possible that there is
some endian code somewhere which is not paying attention to the
architecture flags, but that would probably mean a breakage on
big endian hardware.
Look in fs/xfs/xfs_log_priv.h for this code:
/* our fmt */
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define XLOG_FMT XLOG_FMT_LINUX_LE
#else
#if __BYTE_ORDER == __BIG_ENDIAN
#define XLOG_FMT XLOG_FMT_LINUX_BE
#else
#error unknown byte order
#endif
#endif
you probably need to tweak that. There are a number of other places in
the xfs code which depend on the value of __BYTE_ORDER, you might try
changing that instead of doing what you did.
Steve
--
Steve Lord voice: +1-651-683-3511
Principal Engineer, Filesystem Software email: lord@xxxxxxx
|