# exercise xfs_repair repairing broken filesystems (root inodes)
#
#-----------------------------------------------------------------------
-# Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
+# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License as
# real QA test starts here
_require_scratch
-# devzero blows away 512byte blocks, so make 512byte inodes
-mkfs -t xfs -f -i size=512 $SCRATCH_DEV | _filter_mkfs 2>/dev/null
+# devzero blows away 512byte blocks, so make 512byte inodes (at least)
+mkfs_xfs $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
+source $tmp.mkfs
+[ $isize -lt 512 ] && \
+ mkfs_xfs -isize=512 $SCRATCH_DEV | _filter_mkfs >/dev/null 2>&1
+
`xfs_db -r -c sb -c p $SCRATCH_DEV | grep 'ino = ' | \
sed -e 's/ //g' -e 's/^/export /'`