@@ -2200,15 +2200,52 @@ _get_os_name()
fi
}
+_link_out_file_named()
+{
+ export FEATURES=$2
+ SUFFIX=$(perl -e '
+ my %feathash;
+ my $feature, $result, $suffix, $opts;
+
+ foreach $feature (split(/,/, $ENV{"FEATURES"})) {
+ $feathash{$feature} = 1;
+ }
+ $result = "default";
+ while (<>) {
+ my $found = 1;
+
+ chomp;
+ ($opts, $suffix) = split(/ *: */);
+ foreach my $opt (split(/,/, $opts)) {
+ if (!exists($feathash{$opt})) {
+ $found = 0;
+ last;
+ }
+ }
+ if ($found == 1) {
+ $result = $suffix;
+ last;
+ }
+ }
+ print $result
+ ' <$seqfull.cfg)
+ rm -f $1
+ SRC=$(basename $1)
+ ln -fs $SRC.$SUFFIX $1
+}
+
_link_out_file()
{
- if [ -z "$1" -o -z "$2" ]; then
- echo Error must pass src and dst.
- exit
+ if [ $# -eq 0 ]; then
+ FEATURES="$(_get_os_name)"
+ if [ -n "$MOUNT_OPTIONS" ]; then
+ FEATURES=$FEATURES,${MOUNT_OPTIONS##"-o "}
+ fi
+ else
+ FEATURES=$1
fi
- rm -f $2
- SUFFIX=$(_get_os_name())
- ln -s $1.$SUFFIX $2
+
+ _link_out_file_named $seqfull.out "$FEATURES"
}
_die()
@@ -43,7 +43,7 @@ _filter()
}
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# real QA test starts here
_supported_fs generic
new file mode 100644
@@ -0,0 +1,2 @@
+irix: irix
+linux: linux
@@ -54,7 +54,7 @@ _require_scratch
_require_v2log
# link correct .out file
-_link_out_file $seq.op $seqfull.op
+_link_out_file_named $seqfull.op $(_get_os_name)
echo "*** init FS"
umount $SCRATCH_DEV >/dev/null 2>&1
new file mode 100644
@@ -0,0 +1,2 @@
+irix: irix
+linux: linux
@@ -39,7 +39,7 @@ trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15
. ./common/dump
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# real QA test starts here
_supported_fs xfs
new file mode 100644
@@ -0,0 +1,2 @@
+irix: irix
+linux: linux
@@ -38,7 +38,7 @@ trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15
. ./common/dump
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# real QA test starts here
_supported_fs xfs
new file mode 100644
@@ -0,0 +1,2 @@
+irix: irix
+linux: linux
@@ -46,7 +46,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common/repair
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# nuke the superblock, AGI, AGF, AGFL; then try repair the damage
#
new file mode 100644
@@ -0,0 +1,2 @@
+irix: irix
+linux: linux
@@ -39,7 +39,7 @@ rm -f $seqres.full
. ./common/filter
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
_check_repair()
{
new file mode 100644
@@ -0,0 +1,2 @@
+irix: irix
+linux: linux
@@ -84,11 +84,11 @@ _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
_scratch_mkfs_xfs -isize=512 | _filter_mkfs >/dev/null 2>&1
# link correct .out file
+FEATURES=$(_get_os_name)
if [ $_fs_has_crcs -eq 1 ]; then
- _link_out_file $seq.crc.out $seqfull.out
-else
- _link_out_file $seq.out $seqfull.out
+ FEATURES=$FEATURES,crc
fi
+_link_out_file_named $seqfull.out "$FEATURES"
`xfs_db -r -c sb -c p $SCRATCH_DEV | grep 'ino = ' | \
sed -e 's/ //g' -e 's/^/export /'`
new file mode 100644
@@ -0,0 +1,3 @@
+irix: irix
+linux,crc: crc.linux
+linux: linux
deleted file mode 100644
@@ -1,197 +0,0 @@
-QA output created by 033
-meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
-data = bsize=XXX blocks=XXX, imaxpct=PCT
- = sunit=XXX swidth=XXX, unwritten=X
-naming =VERN bsize=XXX
-log =LDEV bsize=XXX blocks=XXX
-realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
-Corrupting root inode - setting bits to 0
-Wrote X.XXKb (value 0x0)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
- - zero log...
- - scan filesystem freespace and inode maps...
- - found root inode chunk
-Phase 3 - for each AG...
- - scan and clear agi unlinked lists...
- - process known inodes and perform inode discovery...
-bad magic number 0x0 on inode INO
-bad version number 0x0 on inode INO
-inode identifier 0 mismatch on inode INO
-bad magic number 0x0 on inode INO, resetting magic number
-bad version number 0x0 on inode INO, resetting version number
-inode identifier 0 mismatch on inode INO
-cleared root inode INO
- - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
- - setting up duplicate extent list...
-root inode lost
- - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
- - reset superblock...
-Phase 6 - check inode connectivity...
-reinitializing root directory
- - resetting contents of realtime bitmap and summary inodes
- - traversing filesystem ...
- - traversal finished ...
- - moving disconnected inodes to lost+found ...
-Phase 7 - verify and correct link counts...
-resetting inode INO nlinks from 1 to 2
-done
-Corrupting rt bitmap inode - setting bits to 0
-Wrote X.XXKb (value 0x0)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
- - zero log...
- - scan filesystem freespace and inode maps...
- - found root inode chunk
-Phase 3 - for each AG...
- - scan and clear agi unlinked lists...
- - process known inodes and perform inode discovery...
-bad magic number 0x0 on inode INO
-bad version number 0x0 on inode INO
-inode identifier 0 mismatch on inode INO
-bad magic number 0x0 on inode INO, resetting magic number
-bad version number 0x0 on inode INO, resetting version number
-inode identifier 0 mismatch on inode INO
-cleared realtime bitmap inode INO
- - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
- - setting up duplicate extent list...
- - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
- - reset superblock...
-Phase 6 - check inode connectivity...
-reinitializing realtime bitmap inode
- - resetting contents of realtime bitmap and summary inodes
- - traversing filesystem ...
- - traversal finished ...
- - moving disconnected inodes to lost+found ...
-Phase 7 - verify and correct link counts...
-done
-Corrupting rt summary inode - setting bits to 0
-Wrote X.XXKb (value 0x0)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
- - zero log...
- - scan filesystem freespace and inode maps...
- - found root inode chunk
-Phase 3 - for each AG...
- - scan and clear agi unlinked lists...
- - process known inodes and perform inode discovery...
-bad magic number 0x0 on inode INO
-bad version number 0x0 on inode INO
-inode identifier 0 mismatch on inode INO
-bad magic number 0x0 on inode INO, resetting magic number
-bad version number 0x0 on inode INO, resetting version number
-inode identifier 0 mismatch on inode INO
-cleared realtime summary inode INO
- - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
- - setting up duplicate extent list...
- - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
- - reset superblock...
-Phase 6 - check inode connectivity...
-reinitializing realtime summary inode
- - resetting contents of realtime bitmap and summary inodes
- - traversing filesystem ...
- - traversal finished ...
- - moving disconnected inodes to lost+found ...
-Phase 7 - verify and correct link counts...
-done
-Corrupting root inode - setting bits to -1
-Wrote X.XXKb (value 0xffffffff)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
- - zero log...
- - scan filesystem freespace and inode maps...
- - found root inode chunk
-Phase 3 - for each AG...
- - scan and clear agi unlinked lists...
- - process known inodes and perform inode discovery...
-bad magic number 0xffff on inode INO
-bad version number 0xffffffff on inode INO
-inode identifier 18446744073709551615 mismatch on inode INO
-bad magic number 0xffff on inode INO, resetting magic number
-bad version number 0xffffffff on inode INO, resetting version number
-inode identifier 18446744073709551615 mismatch on inode INO
-cleared root inode INO
- - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
- - setting up duplicate extent list...
-root inode lost
- - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
- - reset superblock...
-Phase 6 - check inode connectivity...
-reinitializing root directory
- - resetting contents of realtime bitmap and summary inodes
- - traversing filesystem ...
- - traversal finished ...
- - moving disconnected inodes to lost+found ...
-Phase 7 - verify and correct link counts...
-resetting inode INO nlinks from 1 to 2
-done
-Corrupting rt bitmap inode - setting bits to -1
-Wrote X.XXKb (value 0xffffffff)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
- - zero log...
- - scan filesystem freespace and inode maps...
- - found root inode chunk
-Phase 3 - for each AG...
- - scan and clear agi unlinked lists...
- - process known inodes and perform inode discovery...
-bad magic number 0xffff on inode INO
-bad version number 0xffffffff on inode INO
-inode identifier 18446744073709551615 mismatch on inode INO
-bad magic number 0xffff on inode INO, resetting magic number
-bad version number 0xffffffff on inode INO, resetting version number
-inode identifier 18446744073709551615 mismatch on inode INO
-cleared realtime bitmap inode INO
- - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
- - setting up duplicate extent list...
- - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
- - reset superblock...
-Phase 6 - check inode connectivity...
-reinitializing realtime bitmap inode
- - resetting contents of realtime bitmap and summary inodes
- - traversing filesystem ...
- - traversal finished ...
- - moving disconnected inodes to lost+found ...
-Phase 7 - verify and correct link counts...
-done
-Corrupting rt summary inode - setting bits to -1
-Wrote X.XXKb (value 0xffffffff)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
- - zero log...
- - scan filesystem freespace and inode maps...
- - found root inode chunk
-Phase 3 - for each AG...
- - scan and clear agi unlinked lists...
- - process known inodes and perform inode discovery...
-bad magic number 0xffff on inode INO
-bad version number 0xffffffff on inode INO
-inode identifier 18446744073709551615 mismatch on inode INO
-bad magic number 0xffff on inode INO, resetting magic number
-bad version number 0xffffffff on inode INO, resetting version number
-inode identifier 18446744073709551615 mismatch on inode INO
-cleared realtime summary inode INO
- - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
- - setting up duplicate extent list...
- - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
- - reset superblock...
-Phase 6 - check inode connectivity...
-reinitializing realtime summary inode
- - resetting contents of realtime bitmap and summary inodes
- - traversing filesystem ...
- - traversal finished ...
- - moving disconnected inodes to lost+found ...
-Phase 7 - verify and correct link counts...
-done
new file mode 100644
@@ -0,0 +1,197 @@
+QA output created by 033
+meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
+data = bsize=XXX blocks=XXX, imaxpct=PCT
+ = sunit=XXX swidth=XXX, unwritten=X
+naming =VERN bsize=XXX
+log =LDEV bsize=XXX blocks=XXX
+realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
+Corrupting root inode - setting bits to 0
+Wrote X.XXKb (value 0x0)
+Phase 1 - find and verify superblock...
+Phase 2 - using <TYPEOF> log
+ - zero log...
+ - scan filesystem freespace and inode maps...
+ - found root inode chunk
+Phase 3 - for each AG...
+ - scan and clear agi unlinked lists...
+ - process known inodes and perform inode discovery...
+bad magic number 0x0 on inode INO
+bad version number 0x0 on inode INO
+inode identifier 0 mismatch on inode INO
+bad magic number 0x0 on inode INO, resetting magic number
+bad version number 0x0 on inode INO, resetting version number
+inode identifier 0 mismatch on inode INO
+cleared root inode INO
+ - process newly discovered inodes...
+Phase 4 - check for duplicate blocks...
+ - setting up duplicate extent list...
+root inode lost
+ - check for inodes claiming duplicate blocks...
+Phase 5 - rebuild AG headers and trees...
+ - reset superblock...
+Phase 6 - check inode connectivity...
+reinitializing root directory
+ - resetting contents of realtime bitmap and summary inodes
+ - traversing filesystem ...
+ - traversal finished ...
+ - moving disconnected inodes to lost+found ...
+Phase 7 - verify and correct link counts...
+resetting inode INO nlinks from 1 to 2
+done
+Corrupting rt bitmap inode - setting bits to 0
+Wrote X.XXKb (value 0x0)
+Phase 1 - find and verify superblock...
+Phase 2 - using <TYPEOF> log
+ - zero log...
+ - scan filesystem freespace and inode maps...
+ - found root inode chunk
+Phase 3 - for each AG...
+ - scan and clear agi unlinked lists...
+ - process known inodes and perform inode discovery...
+bad magic number 0x0 on inode INO
+bad version number 0x0 on inode INO
+inode identifier 0 mismatch on inode INO
+bad magic number 0x0 on inode INO, resetting magic number
+bad version number 0x0 on inode INO, resetting version number
+inode identifier 0 mismatch on inode INO
+cleared realtime bitmap inode INO
+ - process newly discovered inodes...
+Phase 4 - check for duplicate blocks...
+ - setting up duplicate extent list...
+ - check for inodes claiming duplicate blocks...
+Phase 5 - rebuild AG headers and trees...
+ - reset superblock...
+Phase 6 - check inode connectivity...
+reinitializing realtime bitmap inode
+ - resetting contents of realtime bitmap and summary inodes
+ - traversing filesystem ...
+ - traversal finished ...
+ - moving disconnected inodes to lost+found ...
+Phase 7 - verify and correct link counts...
+done
+Corrupting rt summary inode - setting bits to 0
+Wrote X.XXKb (value 0x0)
+Phase 1 - find and verify superblock...
+Phase 2 - using <TYPEOF> log
+ - zero log...
+ - scan filesystem freespace and inode maps...
+ - found root inode chunk
+Phase 3 - for each AG...
+ - scan and clear agi unlinked lists...
+ - process known inodes and perform inode discovery...
+bad magic number 0x0 on inode INO
+bad version number 0x0 on inode INO
+inode identifier 0 mismatch on inode INO
+bad magic number 0x0 on inode INO, resetting magic number
+bad version number 0x0 on inode INO, resetting version number
+inode identifier 0 mismatch on inode INO
+cleared realtime summary inode INO
+ - process newly discovered inodes...
+Phase 4 - check for duplicate blocks...
+ - setting up duplicate extent list...
+ - check for inodes claiming duplicate blocks...
+Phase 5 - rebuild AG headers and trees...
+ - reset superblock...
+Phase 6 - check inode connectivity...
+reinitializing realtime summary inode
+ - resetting contents of realtime bitmap and summary inodes
+ - traversing filesystem ...
+ - traversal finished ...
+ - moving disconnected inodes to lost+found ...
+Phase 7 - verify and correct link counts...
+done
+Corrupting root inode - setting bits to -1
+Wrote X.XXKb (value 0xffffffff)
+Phase 1 - find and verify superblock...
+Phase 2 - using <TYPEOF> log
+ - zero log...
+ - scan filesystem freespace and inode maps...
+ - found root inode chunk
+Phase 3 - for each AG...
+ - scan and clear agi unlinked lists...
+ - process known inodes and perform inode discovery...
+bad magic number 0xffff on inode INO
+bad version number 0xffffffff on inode INO
+inode identifier 18446744073709551615 mismatch on inode INO
+bad magic number 0xffff on inode INO, resetting magic number
+bad version number 0xffffffff on inode INO, resetting version number
+inode identifier 18446744073709551615 mismatch on inode INO
+cleared root inode INO
+ - process newly discovered inodes...
+Phase 4 - check for duplicate blocks...
+ - setting up duplicate extent list...
+root inode lost
+ - check for inodes claiming duplicate blocks...
+Phase 5 - rebuild AG headers and trees...
+ - reset superblock...
+Phase 6 - check inode connectivity...
+reinitializing root directory
+ - resetting contents of realtime bitmap and summary inodes
+ - traversing filesystem ...
+ - traversal finished ...
+ - moving disconnected inodes to lost+found ...
+Phase 7 - verify and correct link counts...
+resetting inode INO nlinks from 1 to 2
+done
+Corrupting rt bitmap inode - setting bits to -1
+Wrote X.XXKb (value 0xffffffff)
+Phase 1 - find and verify superblock...
+Phase 2 - using <TYPEOF> log
+ - zero log...
+ - scan filesystem freespace and inode maps...
+ - found root inode chunk
+Phase 3 - for each AG...
+ - scan and clear agi unlinked lists...
+ - process known inodes and perform inode discovery...
+bad magic number 0xffff on inode INO
+bad version number 0xffffffff on inode INO
+inode identifier 18446744073709551615 mismatch on inode INO
+bad magic number 0xffff on inode INO, resetting magic number
+bad version number 0xffffffff on inode INO, resetting version number
+inode identifier 18446744073709551615 mismatch on inode INO
+cleared realtime bitmap inode INO
+ - process newly discovered inodes...
+Phase 4 - check for duplicate blocks...
+ - setting up duplicate extent list...
+ - check for inodes claiming duplicate blocks...
+Phase 5 - rebuild AG headers and trees...
+ - reset superblock...
+Phase 6 - check inode connectivity...
+reinitializing realtime bitmap inode
+ - resetting contents of realtime bitmap and summary inodes
+ - traversing filesystem ...
+ - traversal finished ...
+ - moving disconnected inodes to lost+found ...
+Phase 7 - verify and correct link counts...
+done
+Corrupting rt summary inode - setting bits to -1
+Wrote X.XXKb (value 0xffffffff)
+Phase 1 - find and verify superblock...
+Phase 2 - using <TYPEOF> log
+ - zero log...
+ - scan filesystem freespace and inode maps...
+ - found root inode chunk
+Phase 3 - for each AG...
+ - scan and clear agi unlinked lists...
+ - process known inodes and perform inode discovery...
+bad magic number 0xffff on inode INO
+bad version number 0xffffffff on inode INO
+inode identifier 18446744073709551615 mismatch on inode INO
+bad magic number 0xffff on inode INO, resetting magic number
+bad version number 0xffffffff on inode INO, resetting version number
+inode identifier 18446744073709551615 mismatch on inode INO
+cleared realtime summary inode INO
+ - process newly discovered inodes...
+Phase 4 - check for duplicate blocks...
+ - setting up duplicate extent list...
+ - check for inodes claiming duplicate blocks...
+Phase 5 - rebuild AG headers and trees...
+ - reset superblock...
+Phase 6 - check inode connectivity...
+reinitializing realtime summary inode
+ - resetting contents of realtime bitmap and summary inodes
+ - traversing filesystem ...
+ - traversal finished ...
+ - moving disconnected inodes to lost+found ...
+Phase 7 - verify and correct link counts...
+done
@@ -37,7 +37,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
. ./common/dump
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# real QA test starts here
_supported_fs xfs
new file mode 100644
@@ -0,0 +1,2 @@
+irix: irix
+linux: linux
@@ -37,7 +37,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
. ./common/dump
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# real QA test starts here
_supported_fs xfs
new file mode 100644
@@ -0,0 +1,2 @@
+irix: irix
+linux: linux
@@ -37,7 +37,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
. ./common/dump
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# real QA test starts here
_supported_fs xfs
new file mode 100644
@@ -0,0 +1,2 @@
+irix: irix
+linux: linux
@@ -39,7 +39,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
. ./common/dump
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# real QA test starts here
_supported_fs xfs
new file mode 100644
@@ -0,0 +1,2 @@
+irix: irix
+linux: linux
@@ -37,7 +37,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
. ./common/dump
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
# real QA test starts here
_supported_fs xfs
@@ -55,7 +55,7 @@ _require_scratch
_require_v2log
# link correct .out file
-_link_out_file $seq.op $seqfull.op
+_link_out_file_named $seqfull.op $(_get_os_name)
echo "*** init FS"
umount $SCRATCH_DEV >/dev/null 2>&1
new file mode 100644
@@ -0,0 +1,2 @@
+irix: irix
+linux: linux
@@ -48,7 +48,7 @@ _supported_fs xfs
_supported_os Linux IRIX
# link correct .out file
-_link_out_file $seq.out $seqfull.out
+_link_out_file
_require_scratch
_scratch_mkfs_xfs >/dev/null 2>&1
new file mode 100644
@@ -0,0 +1,2 @@
+irix: irix
+linux: linux