[PATCH] xfs/033: add golden output for CRC enaled filesystems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Dave Chinner <dchinner@xxxxxxxxxx>

CRC enabled filesystems emit different errors on corruption.
Specifically, inode corruption is picked up much earlier due to
verifier failures (e.g. incorrect inode identifier) and so
xfs_repair throws errors sufficiently different that filtering
cannot hide the differences. Hence simply add a new golden output
file and link it appropriately once we know what type of filesystem
we are testing.

Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
---
 common/filter               |   3 +
 tests/xfs/033               |  10 ++-
 tests/xfs/033.crc.out.linux | 197 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 207 insertions(+), 3 deletions(-)
 create mode 100644 tests/xfs/033.crc.out.linux

diff --git a/common/filter b/common/filter
index 04d12c4..bb7fb33 100644
--- a/common/filter
+++ b/common/filter
@@ -152,6 +152,9 @@ _filter_mkfs()
     if (/^\s+=\s+sectsz=(\d+)\s+attr=(\d+)/) {
         print STDERR "sectsz=$1\nattr=$2\n";
     }
+    if (/^\s+=\s+crc=(\d)/) {
+        print STDERR "crc=$1\n";
+    }
     if (/^data\s+=\s+bsize=(\d+)\s+blocks=(\d+), imaxpct=(\d+)/) {
 	print STDERR "dbsize=$1\ndblocks=$2\nimaxpct=$3\n";
 	print STDOUT "data     = bsize=XXX blocks=XXX, imaxpct=PCT\n";
diff --git a/tests/xfs/033 b/tests/xfs/033
index bf906e0..81ba3a0 100755
--- a/tests/xfs/033
+++ b/tests/xfs/033
@@ -45,9 +45,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common/filter
 . ./common/repair
 
-# link correct .out file
-_link_out_file $seq.out $seqfull.out
-
 # nuke the root, rt bitmap, and rt summary inodes
 # 
 _check_root_inos()
@@ -86,6 +83,13 @@ _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
 [ $isize -lt 512 ] && \
 	_scratch_mkfs_xfs -isize=512 | _filter_mkfs >/dev/null 2>&1
 
+# link correct .out file
+if [ $crc -eq 1 ]; then
+	_link_out_file $seq.crc.out $seqfull.out
+else
+	_link_out_file $seq.out $seqfull.out
+fi
+
 `xfs_db -r -c sb -c p $SCRATCH_DEV | grep 'ino = ' | \
 	sed -e 's/ //g' -e 's/^/export /'`
 
diff --git a/tests/xfs/033.crc.out.linux b/tests/xfs/033.crc.out.linux
new file mode 100644
index 0000000..a6e86b9
--- /dev/null
+++ b/tests/xfs/033.crc.out.linux
@@ -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
-- 
1.8.4.rc3

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux