--- /dev/null
+#!/bin/sh
+#set -x
+#REPO=`egrep -v ^# ${HOME}/U/.makeu`
+
+#if test -z "$REPO" ; then
+# REPO=`uname -r | sed 's/-.*$//g' | cut -d. -f3`
+#fi
+#test -z "$REPO" && exit 1
+
+#cd ${HOME}/U/$REPO || exit 1
+#TOP=${HOME}/U/$REPO
+TOP=/lib/modules/`uname -r`/build
+
+MODULES="unionfs wrapfs nfs nfsd jffs2 xfs overlayfs"
+for MOD in $MODULES; do
+ test -f $TOP/fs/$MOD/$MOD.ko && \
+ cp -uv $TOP/fs/$MOD/$MOD.ko \
+ /lib/modules/`uname -r`/kernel/fs/$MOD
+done
+#make modules_install
+
+MTD=drivers/mtd/devices/block2mtd.ko
+test -f $TOP/$MTD && cp -uv $TOP/$MTD /lib/modules/`uname -r`/kernel/$MTD
+
+exit 0
--- /dev/null
+#!/bin/sh
+# RACER tests
+
+##############################################################################
+# scratch device to mount on /n/scratch
+#SCRATCH_DEV=/dev/hdd2
+SCRATCH_DEV=/dev/sdb1
+
+function runcmd
+{
+ echo "CMD: $@"
+ sleep 0.25
+ $@
+ ret=$?
+ if test $ret -ne 0 ; then
+ exit $ret
+ fi
+}
+function runcmd2
+{
+ echo "CMD: $@"
+ sleep 0.25
+ $@
+# ret=$?
+}
+
+function cleanup
+{
+# cleanup
+case "$type" in
+ wrapfs )
+ runcmd umount /tmp
+ runcmd rmmod wrapfs
+ ;;
+ bind )
+ runcmd umount /tmp
+ ;;
+esac
+#read n
+case "$lowertype" in
+ ext2 | ext3 | ext4 | reiserfs | xfs )
+ runcmd umount /n/scratch
+ ;;
+ tmpfs )
+ runcmd umount /n/scratch
+ runcmd swapoff $SCRATCH_DEV
+ ;;
+ nfs )
+ runcmd umount /n/scratch
+ runcmd exportfs -u localhost:/n/lower
+ runcmd umount /n/lower
+ ;;
+esac
+}
+
+# decide what type of test
+type="bind" # default
+case "$1" in
+ -w | -wrapfs ) type="wrapfs" ; shift ;;
+esac
+case "$1" in
+ ext3 | ext2 | ext4 | reiserfs | xfs | tmpfs | nfs ) lowertype=$1 ;;
+ * )
+ echo "Usage: $0 '[-w(rapfs)] LOWERTYPE [duration (60 sec default)]'"
+ echo "where LOWERTYPE is one of: ext[234] reiserfs xfs tmpfs nfs"
+ exit 1
+ ;;
+esac
+
+runcmd2 ./j-install.sh
+#runcmd2 ./j-syslog.sh
+
+# cleanup if needed
+if egrep -q $type /proc/mounts
+then
+ cleanup
+fi
+
+case "$lowertype" in
+ ext2 | ext3 | ext4 | reiserfs )
+ runcmd mkfs -t $lowertype -q $SCRATCH_DEV
+ runcmd mount -t $lowertype $SCRATCH_DEV /n/scratch
+ ;;
+ xfs )
+ runcmd mkfs -t $lowertype -q -f $SCRATCH_DEV
+ runcmd mount -t $lowertype $SCRATCH_DEV /n/scratch
+ ;;
+ tmpfs )
+ runcmd mkswap $SCRATCH_DEV
+ runcmd swapon $SCRATCH_DEV
+ runcmd swapon -s
+ runcmd mount -t $lowertype -o size=3000m tmpfs /n/scratch
+ ;;
+ nfs )
+ runcmd mkdir -p /n/lower
+ runcmd mkfs -t ext3 -q $SCRATCH_DEV
+ runcmd mount -t ext3 $SCRATCH_DEV /n/lower
+ runcmd exportfs -o no_root_squash,rw localhost:/n/lower
+ runcmd mount -t $lowertype localhost:/n/lower /n/scratch
+ ;;
+esac
+case "$type" in
+ wrapfs )
+ runcmd mount -t wrapfs /n/scratch /tmp
+ ;;
+ bind )
+ runcmd mount -o bind /n/scratch /tmp
+ ;;
+esac
+
+# (df /tmp /n/scratch ; df -i /tmp /n/scratch) > /var/tmp/.racer0.$$
+
+# run actual racer tests (30 seconds)
+runcmd find /tmp -ls
+runcmd df /tmp
+runcmd df -i /tmp
+runcmd ../racer/racer2.sh /tmp/r ${2:-60}
+runcmd sync
+if test $? != 0 ; then
+ ps -ef | grep bash
+ set -x; find /tmp/r -ls ; set +x
+ echo "*** RACER FAILED ***!!!! (hit enter to continue)..."
+ sleep 5
+fi
+#runcmd ../racer/fs_racer2.sh -t ${2:-30}
+#runcmd sleep 1
+runcmd sync
+runcmd find /tmp -ls
+runcmd sync
+#runcmd sleep 1
+runcmd df /tmp
+runcmd sync
+#runcmd sleep 1
+runcmd df -i /tmp
+runcmd sync
+#runcmd sleep 1
+
+runcmd sync # to let lower inodes/blocks purge before "df"
+# (df /tmp /n/scratch ; df -i /tmp /n/scratch) > /var/tmp/.racer1.$$
+# if cmp -s /var/tmp/.racer0.$$ /var/tmp/.racer1.$$ ; then
+# rm -f /var/tmp/.racer0.$$ /var/tmp/.racer1.$$
+# echo INODE/BLOCK ACCOUNTING IS GOOD.
+# else
+# echo BAD INODE/BLOCK ACCOUNTING:
+# set -x
+# diff /var/tmp/.racer0.$$ /var/tmp/.racer1.$$
+# exit 123
+# fi
+
+cleanup
+
+./j-scanlog.sh