xfs
[Top] [All Lists]

Major milestone in endian work

To: xfs@xxxxxxxxxxx
Subject: Major milestone in endian work
From: Ken McDonell <kenmcd@xxxxxxxxxxxxxxxxx>
Date: Fri, 28 Apr 2000 12:41:27 +1000
Cc: ptg@xxxxxxxxxxxxxxxxxxxxxxx
Sender: owner-linux-xfs@xxxxxxxxxxx
Thanks mainly to the efforts of Daniel Moore, Nathan Scott and Ivan
Rayner, the XFS endian work has progressed to the point where we can
perform the following tasks:

+ on Irix/MIPS make a default 20 Mbyte filesystem, then populate it as
  follows:
        - files of 200, 100 and 50 Kbytes
        - some scripts
        - 1000 files with names test.0001 thru test.1000 and sizes
          increasing from 16, 32, ... 16,000 bytes
        - allocate the 1000 files in a cascading hierarchy with 20
          files and 1 dir at the top level, 40 files and 1 dir at the
          next level, 80 files and 1 dir at the next level, ....
        - compute and save the checksum for every file

+ run an exerciser script (show-me) that runs some simple commands,
  then recursively descends the file system recomputing and checking
  the checksums ... and capture the output

+ copy the Irix/MIPS filesystem byte-for-byte to a disk partition on
  a Linux/Intel system

+ mount the filesytem read-only on Linux with a kernel that includes:
        - big endian mode for XFS
        - a special hack to avoid log recovery (not done yet, although
          clean log detection is almost there)

+ run show-me on the Linux system, and hey presto, the same output
  as on the Irix system.

So this demonstrates that basic functions like:
        - superblocks
        - inodes
        - type 1 directories (in several variants)
        - file data blocks for assorted smallish file sizes
are working correctly and compatible between Irix and big endian XFS on
Linux.

Next we expect to be able to exercise the write-side of the endian
changes (all of the code changes have been done), but first there
are some remaining wrinkles in handling the XFS log that need to be
worked through.

Then more regression and coverage testing before the expected
performance bake-off between little and big endian XFS on Linux.

Attached is the output from show-me.


---------- Forwarded message ----------
Date: Fri, 28 Apr 2000 10:54:38 +1000 (EST)
From: Ivan Rayner <ivanr@omen>

=== setup ===
#!/bin/sh
#
# populate files on the IRIX system
#

case `uname`
in
    IRIX*)
        ;;
    *)
        echo "Only run setup on IRIX, bozo!"
        exit 1
        ;;
esac

rm -rf a b out

dd if=/unix ibs=1024 count=100 of=a 2>/dev/null

# dirs are b, b/b, b/b/b, b/b/b/b, ... each populated with
# $q files, where $q starts at 10 and doubles with each level
# each file in the series is larger than the previous file by 16 bytes
#
top=`pwd`
q=10
nexti=10
mkdir b
cd b
i=1
nfile=1000
while [ $i -le $nfile ]
do
        dd if=/unix ibs=16 count=$i of=test.`printf "%04d" $i` 2>/dev/null
        t=`expr $i % 50`
        if [ $t -eq 0 ]
        then
                echo " $i of $nfile"
        else
                echo -n .
        fi
        if [ $i -eq $nexti ]
        then
                mkdir b
                cd b
                echo -n D
                q=`expr $q + $q`
                nexti=`expr $nexti + $q`
        fi
        i=`expr $i + 1`
done
echo

cd $top

dd if=/unix ibs=1024 count=50 of=c 2>/dev/null
dd if=/unix ibs=1024 count=200 of=d 2>/dev/null

find . -type f -print \
| sed -e '/^\.\/out$/d' \
| xargs sum \
| sort -r +2 -3 >out

=== show-me ===
#!/bin/sh
#
# demo on either system
#

case `uname`
in
    IRIX*)
        SUM="sum"
        ;;
    *)
        # assume Linux
        #
        SUM="sum -s"
        ;;
esac

echo "=== setup ==="
cat setup

echo
echo "=== show-me ==="
cat show-me

echo
echo "=== top level ls ==="
ls -la .

echo
echo "=== directories ==="
find . -type d -print \
| while read d
do
    echo "$d: `ls $d | wc -l | sed -e 's/ //g'` entries"
done

echo
echo "=== head and tail of checksums ==="
head -5 out
echo "..."
tail -5 out

echo
echo "=== sum and diff ==="
find . -type f -print \
| sed -e '/^\.\/out$/d' \
| xargs $SUM \
| sort -r +2 -3 \
| diff - out

=== top level ls ===
total 800
drwxr-xr-x    3 root     sys          107 Apr 28 12:02 .
drwxr-xr-x    5 root     sys           51 Feb 21 10:48 ..
-rw-r--r--    1 root     sys       102400 Apr 28 12:02 a
drwxr-xr-x    3 root     sys         4096 Apr 28 12:02 b
-rw-r--r--    1 root     sys        51200 Apr 28 12:02 c
-rwxr-xr-x    1 root     sys          151 Apr 28 11:46 cleanup
-rw-r--r--    1 root     sys       204800 Apr 28 12:02 d
-rw-r--r--    1 root     sys        32136 Apr 28 12:02 out
-rwxr-xr-x    1 root     sys          962 Apr 28 12:01 setup
-rwxr-xr-x    1 root     sys          596 Apr 28 11:46 show-me

=== directories ===
.: 8 entries
./b: 11 entries
./b/b: 21 entries
./b/b/b: 41 entries
./b/b/b/b: 81 entries
./b/b/b/b/b: 161 entries
./b/b/b/b/b/b: 321 entries
./b/b/b/b/b/b/b: 370 entries

=== head and tail of checksums ===
44002 2 ./show-me
7323 2 ./setup
55375 400 ./d
10818 1 ./cleanup
32056 100 ./c
...
7514 20 ./b/b/b/b/b/b/b/test.0634
6758 20 ./b/b/b/b/b/b/b/test.0633
5676 20 ./b/b/b/b/b/b/b/test.0632
5042 20 ./b/b/b/b/b/b/b/test.0631
15288 200 ./a

=== sum and diff ===



<Prev in Thread] Current Thread [Next in Thread>
  • Major milestone in endian work, Ken McDonell <=