All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs/030: link .out file according to reflink support status
@ 2016-03-30  9:57 ` Eryu Guan
  0 siblings, 0 replies; 12+ messages in thread
From: Eryu Guan @ 2016-03-30  9:57 UTC (permalink / raw)
  To: fstests; +Cc: xfs, darrick.wong, Eryu Guan

Commit 31f48569c353 ("xfs/030: fix output on newer filesystems") added
more lines to .out file to match the output from XFS with reflink
support, but it broke test on older XFS.

Fix it by introducing new .out file 030.out.reflink.linux to match the
reflink case, so old XFS still compares .out file against 030.out.linux.

In order to do this, a new helper is introduced, _fs_has_reflink()
accepts mount point as argument and returns if the underlying fs
supports reflink or not.

Signed-off-by: Eryu Guan <eguan@redhat.com>
---

I didn't test this patch on newer XFS, but it did pass for me on current
4.6-rc1 kernel.

 common/reflink                  |  18 +++
 tests/xfs/030                   |  12 +-
 tests/xfs/030.cfg               |   1 +
 tests/xfs/030.out.linux         |   2 -
 tests/xfs/030.out.reflink.linux | 252 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 280 insertions(+), 5 deletions(-)
 create mode 100644 tests/xfs/030.out.reflink.linux

diff --git a/common/reflink b/common/reflink
index 4ec390d..bdfc01c 100644
--- a/common/reflink
+++ b/common/reflink
@@ -156,6 +156,24 @@ _cp_reflink() {
 	cp --reflink=always -p "$file1" "$file2"
 }
 
+# given a mount point and test the underlying fs supports reflink or not
+_fs_has_reflink()
+{
+	if [ -z $1 ] || [ ! -d $1 ]; then
+		echo "Missing mount point argument for _fs_has_reflink()"
+		exit 1
+	fi
+	local src=$1/_fs_has_reflink_testfile
+	local tgt=$src.reflink
+	local ret=0
+
+	echo "reflink test" > $src
+	_cp_reflink $src $tgt >/dev/null 2>&1
+	ret=$?
+	rm -f $src $tgt >/dev/null 2>&1
+	return $ret
+}
+
 # Reflink some file1 into file2
 _reflink() {
 	file1="$1"
diff --git a/tests/xfs/030 b/tests/xfs/030
index 33c906c..d171a39 100755
--- a/tests/xfs/030
+++ b/tests/xfs/030
@@ -44,9 +44,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common/rc
 . ./common/filter
 . ./common/repair
-
-# link correct .out file
-_link_out_file
+. ./common/reflink
 
 # nuke the superblock, AGI, AGF, AGFL; then try repair the damage
 #
@@ -90,6 +88,14 @@ else
 		_notrun "GQuota are enabled, test needs controlled sb recovery"
 	src/feature -P $SCRATCH_DEV && \
 		_notrun "PQuota are enabled, test needs controlled sb recovery"
+
+	# link correct .out file
+	features=`_get_os_name`
+	if _fs_has_reflink $SCRATCH_MNT; then
+		features=$feature,reflink
+	fi
+	_link_out_file_named $seqfull.out "$features"
+
 	_scratch_unmount
 fi
 clear=""
diff --git a/tests/xfs/030.cfg b/tests/xfs/030.cfg
index 7ffdfc0..1eacdc1 100644
--- a/tests/xfs/030.cfg
+++ b/tests/xfs/030.cfg
@@ -1,2 +1,3 @@
 irix: irix
+linux,reflink: reflink.linux
 linux: linux
diff --git a/tests/xfs/030.out.linux b/tests/xfs/030.out.linux
index 14b9b35..cf3259f 100644
--- a/tests/xfs/030.out.linux
+++ b/tests/xfs/030.out.linux
@@ -231,8 +231,6 @@ bad agbno AGBNO in agfl, agno 0
 bad agbno AGBNO in agfl, agno 0
 bad agbno AGBNO in agfl, agno 0
 bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
         - found root inode chunk
 Phase 3 - for each AG...
         - scan and clear agi unlinked lists...
diff --git a/tests/xfs/030.out.reflink.linux b/tests/xfs/030.out.reflink.linux
new file mode 100644
index 0000000..14b9b35
--- /dev/null
+++ b/tests/xfs/030.out.reflink.linux
@@ -0,0 +1,252 @@
+QA output created by 030
+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 sb 0 - setting bits to 0
+Wrote X.XXKb (value 0x0)
+Phase 1 - find and verify superblock...
+bad primary superblock - bad magic number !!!
+
+attempting to find secondary superblock...
+found candidate secondary superblock...
+verified secondary superblock...
+writing modified primary superblock
+sb root inode value INO inconsistent with calculated value INO
+resetting superblock root inode pointer to INO
+sb realtime bitmap inode INO inconsistent with calculated value INO
+resetting superblock realtime bitmap ino pointer to INO
+sb realtime summary inode INO inconsistent with calculated value INO
+resetting superblock realtime summary ino pointer to INO
+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...
+        - 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...
+        - 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...
+Note - stripe unit (0) and width (0) fields have been reset.
+Please set with mount -o sunit=<value>,swidth=<value>
+done
+Corrupting agf 0 - 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...
+bad magic # 0x0 for agf 0
+bad version # 0 for agf 0
+bad length 0 for agf 0, should be LENGTH
+reset bad agf for ag 0
+bad agbno AGBNO for btbno root, agno 0
+bad agbno AGBNO for btbcnt root, agno 0
+        - found root inode chunk
+Phase 3 - for each AG...
+        - scan and clear agi unlinked lists...
+        - process known inodes and perform inode discovery...
+        - 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...
+        - 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 agi 0 - 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...
+bad magic # 0x0 for agi 0
+bad version # 0 for agi 0
+bad length # 0 for agi 0, should be LENGTH
+reset bad agi for ag 0
+bad agbno AGBNO for inobt root, agno 0
+root inode chunk not found
+Phase 3 - for each AG...
+        - scan and clear agi unlinked lists...
+        - process known inodes and perform inode discovery...
+        - 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...
+        - 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 agfl 0 - 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...
+        - 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...
+        - 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 sb 0 - setting bits to -1
+Wrote X.XXKb (value 0xffffffff)
+Phase 1 - find and verify superblock...
+bad primary superblock - bad magic number !!!
+
+attempting to find secondary superblock...
+found candidate secondary superblock...
+verified secondary superblock...
+writing modified primary superblock
+sb root inode value INO inconsistent with calculated value INO
+resetting superblock root inode pointer to INO
+sb realtime bitmap inode INO inconsistent with calculated value INO
+resetting superblock realtime bitmap ino pointer to INO
+sb realtime summary inode INO inconsistent with calculated value INO
+resetting superblock realtime summary ino pointer to INO
+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...
+        - 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...
+        - 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...
+Note - stripe unit (0) and width (0) fields have been reset.
+Please set with mount -o sunit=<value>,swidth=<value>
+done
+Corrupting agf 0 - 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...
+bad magic # 0xffffffff for agf 0
+bad version # -1 for agf 0
+bad sequence # -1 for agf 0
+bad length -1 for agf 0, should be LENGTH
+flfirst -1 in agf 0 too large (max = MAX)
+fllast -1 in agf 0 too large (max = MAX)
+reset bad agf for ag 0
+freeblk count 1 != flcount -1 in ag 0
+bad agbno AGBNO for btbno root, agno 0
+bad agbno AGBNO for btbcnt root, agno 0
+        - found root inode chunk
+Phase 3 - for each AG...
+        - scan and clear agi unlinked lists...
+        - process known inodes and perform inode discovery...
+        - 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...
+        - 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 agi 0 - 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...
+bad magic # 0xffffffff for agi 0
+bad version # -1 for agi 0
+bad sequence # -1 for agi 0
+bad length # -1 for agi 0, should be LENGTH
+reset bad agi for ag 0
+bad agbno AGBNO for inobt root, agno 0
+root inode chunk not found
+Phase 3 - for each AG...
+        - scan and clear agi unlinked lists...
+        - process known inodes and perform inode discovery...
+        - 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...
+        - 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 agfl 0 - 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...
+bad agbno AGBNO in agfl, agno 0
+bad agbno AGBNO in agfl, agno 0
+bad agbno AGBNO in agfl, agno 0
+bad agbno AGBNO in agfl, agno 0
+bad agbno AGBNO in agfl, agno 0
+bad agbno AGBNO in agfl, agno 0
+        - found root inode chunk
+Phase 3 - for each AG...
+        - scan and clear agi unlinked lists...
+        - process known inodes and perform inode discovery...
+        - 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...
+        - 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
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH] xfs/030: link .out file according to reflink support status
@ 2016-03-30  9:57 ` Eryu Guan
  0 siblings, 0 replies; 12+ messages in thread
From: Eryu Guan @ 2016-03-30  9:57 UTC (permalink / raw)
  To: fstests; +Cc: darrick.wong, Eryu Guan, xfs

Commit 31f48569c353 ("xfs/030: fix output on newer filesystems") added
more lines to .out file to match the output from XFS with reflink
support, but it broke test on older XFS.

Fix it by introducing new .out file 030.out.reflink.linux to match the
reflink case, so old XFS still compares .out file against 030.out.linux.

In order to do this, a new helper is introduced, _fs_has_reflink()
accepts mount point as argument and returns if the underlying fs
supports reflink or not.

Signed-off-by: Eryu Guan <eguan@redhat.com>
---

I didn't test this patch on newer XFS, but it did pass for me on current
4.6-rc1 kernel.

 common/reflink                  |  18 +++
 tests/xfs/030                   |  12 +-
 tests/xfs/030.cfg               |   1 +
 tests/xfs/030.out.linux         |   2 -
 tests/xfs/030.out.reflink.linux | 252 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 280 insertions(+), 5 deletions(-)
 create mode 100644 tests/xfs/030.out.reflink.linux

diff --git a/common/reflink b/common/reflink
index 4ec390d..bdfc01c 100644
--- a/common/reflink
+++ b/common/reflink
@@ -156,6 +156,24 @@ _cp_reflink() {
 	cp --reflink=always -p "$file1" "$file2"
 }
 
+# given a mount point and test the underlying fs supports reflink or not
+_fs_has_reflink()
+{
+	if [ -z $1 ] || [ ! -d $1 ]; then
+		echo "Missing mount point argument for _fs_has_reflink()"
+		exit 1
+	fi
+	local src=$1/_fs_has_reflink_testfile
+	local tgt=$src.reflink
+	local ret=0
+
+	echo "reflink test" > $src
+	_cp_reflink $src $tgt >/dev/null 2>&1
+	ret=$?
+	rm -f $src $tgt >/dev/null 2>&1
+	return $ret
+}
+
 # Reflink some file1 into file2
 _reflink() {
 	file1="$1"
diff --git a/tests/xfs/030 b/tests/xfs/030
index 33c906c..d171a39 100755
--- a/tests/xfs/030
+++ b/tests/xfs/030
@@ -44,9 +44,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common/rc
 . ./common/filter
 . ./common/repair
-
-# link correct .out file
-_link_out_file
+. ./common/reflink
 
 # nuke the superblock, AGI, AGF, AGFL; then try repair the damage
 #
@@ -90,6 +88,14 @@ else
 		_notrun "GQuota are enabled, test needs controlled sb recovery"
 	src/feature -P $SCRATCH_DEV && \
 		_notrun "PQuota are enabled, test needs controlled sb recovery"
+
+	# link correct .out file
+	features=`_get_os_name`
+	if _fs_has_reflink $SCRATCH_MNT; then
+		features=$feature,reflink
+	fi
+	_link_out_file_named $seqfull.out "$features"
+
 	_scratch_unmount
 fi
 clear=""
diff --git a/tests/xfs/030.cfg b/tests/xfs/030.cfg
index 7ffdfc0..1eacdc1 100644
--- a/tests/xfs/030.cfg
+++ b/tests/xfs/030.cfg
@@ -1,2 +1,3 @@
 irix: irix
+linux,reflink: reflink.linux
 linux: linux
diff --git a/tests/xfs/030.out.linux b/tests/xfs/030.out.linux
index 14b9b35..cf3259f 100644
--- a/tests/xfs/030.out.linux
+++ b/tests/xfs/030.out.linux
@@ -231,8 +231,6 @@ bad agbno AGBNO in agfl, agno 0
 bad agbno AGBNO in agfl, agno 0
 bad agbno AGBNO in agfl, agno 0
 bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
         - found root inode chunk
 Phase 3 - for each AG...
         - scan and clear agi unlinked lists...
diff --git a/tests/xfs/030.out.reflink.linux b/tests/xfs/030.out.reflink.linux
new file mode 100644
index 0000000..14b9b35
--- /dev/null
+++ b/tests/xfs/030.out.reflink.linux
@@ -0,0 +1,252 @@
+QA output created by 030
+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 sb 0 - setting bits to 0
+Wrote X.XXKb (value 0x0)
+Phase 1 - find and verify superblock...
+bad primary superblock - bad magic number !!!
+
+attempting to find secondary superblock...
+found candidate secondary superblock...
+verified secondary superblock...
+writing modified primary superblock
+sb root inode value INO inconsistent with calculated value INO
+resetting superblock root inode pointer to INO
+sb realtime bitmap inode INO inconsistent with calculated value INO
+resetting superblock realtime bitmap ino pointer to INO
+sb realtime summary inode INO inconsistent with calculated value INO
+resetting superblock realtime summary ino pointer to INO
+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...
+        - 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...
+        - 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...
+Note - stripe unit (0) and width (0) fields have been reset.
+Please set with mount -o sunit=<value>,swidth=<value>
+done
+Corrupting agf 0 - 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...
+bad magic # 0x0 for agf 0
+bad version # 0 for agf 0
+bad length 0 for agf 0, should be LENGTH
+reset bad agf for ag 0
+bad agbno AGBNO for btbno root, agno 0
+bad agbno AGBNO for btbcnt root, agno 0
+        - found root inode chunk
+Phase 3 - for each AG...
+        - scan and clear agi unlinked lists...
+        - process known inodes and perform inode discovery...
+        - 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...
+        - 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 agi 0 - 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...
+bad magic # 0x0 for agi 0
+bad version # 0 for agi 0
+bad length # 0 for agi 0, should be LENGTH
+reset bad agi for ag 0
+bad agbno AGBNO for inobt root, agno 0
+root inode chunk not found
+Phase 3 - for each AG...
+        - scan and clear agi unlinked lists...
+        - process known inodes and perform inode discovery...
+        - 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...
+        - 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 agfl 0 - 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...
+        - 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...
+        - 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 sb 0 - setting bits to -1
+Wrote X.XXKb (value 0xffffffff)
+Phase 1 - find and verify superblock...
+bad primary superblock - bad magic number !!!
+
+attempting to find secondary superblock...
+found candidate secondary superblock...
+verified secondary superblock...
+writing modified primary superblock
+sb root inode value INO inconsistent with calculated value INO
+resetting superblock root inode pointer to INO
+sb realtime bitmap inode INO inconsistent with calculated value INO
+resetting superblock realtime bitmap ino pointer to INO
+sb realtime summary inode INO inconsistent with calculated value INO
+resetting superblock realtime summary ino pointer to INO
+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...
+        - 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...
+        - 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...
+Note - stripe unit (0) and width (0) fields have been reset.
+Please set with mount -o sunit=<value>,swidth=<value>
+done
+Corrupting agf 0 - 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...
+bad magic # 0xffffffff for agf 0
+bad version # -1 for agf 0
+bad sequence # -1 for agf 0
+bad length -1 for agf 0, should be LENGTH
+flfirst -1 in agf 0 too large (max = MAX)
+fllast -1 in agf 0 too large (max = MAX)
+reset bad agf for ag 0
+freeblk count 1 != flcount -1 in ag 0
+bad agbno AGBNO for btbno root, agno 0
+bad agbno AGBNO for btbcnt root, agno 0
+        - found root inode chunk
+Phase 3 - for each AG...
+        - scan and clear agi unlinked lists...
+        - process known inodes and perform inode discovery...
+        - 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...
+        - 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 agi 0 - 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...
+bad magic # 0xffffffff for agi 0
+bad version # -1 for agi 0
+bad sequence # -1 for agi 0
+bad length # -1 for agi 0, should be LENGTH
+reset bad agi for ag 0
+bad agbno AGBNO for inobt root, agno 0
+root inode chunk not found
+Phase 3 - for each AG...
+        - scan and clear agi unlinked lists...
+        - process known inodes and perform inode discovery...
+        - 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...
+        - 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 agfl 0 - 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...
+bad agbno AGBNO in agfl, agno 0
+bad agbno AGBNO in agfl, agno 0
+bad agbno AGBNO in agfl, agno 0
+bad agbno AGBNO in agfl, agno 0
+bad agbno AGBNO in agfl, agno 0
+bad agbno AGBNO in agfl, agno 0
+        - found root inode chunk
+Phase 3 - for each AG...
+        - scan and clear agi unlinked lists...
+        - process known inodes and perform inode discovery...
+        - 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...
+        - 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
-- 
2.5.5

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] xfs/030: link .out file according to reflink support status
  2016-03-30  9:57 ` Eryu Guan
@ 2016-03-30 17:24   ` Darrick J. Wong
  -1 siblings, 0 replies; 12+ messages in thread
From: Darrick J. Wong @ 2016-03-30 17:24 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests, xfs

On Wed, Mar 30, 2016 at 05:57:41PM +0800, Eryu Guan wrote:
> Commit 31f48569c353 ("xfs/030: fix output on newer filesystems") added
> more lines to .out file to match the output from XFS with reflink
> support, but it broke test on older XFS.
> 
> Fix it by introducing new .out file 030.out.reflink.linux to match the
> reflink case, so old XFS still compares .out file against 030.out.linux.
> 
> In order to do this, a new helper is introduced, _fs_has_reflink()
> accepts mount point as argument and returns if the underlying fs
> supports reflink or not.
> 
> Signed-off-by: Eryu Guan <eguan@redhat.com>
> ---
> 
> I didn't test this patch on newer XFS, but it did pass for me on current
> 4.6-rc1 kernel.
> 
>  common/reflink                  |  18 +++
>  tests/xfs/030                   |  12 +-
>  tests/xfs/030.cfg               |   1 +
>  tests/xfs/030.out.linux         |   2 -
>  tests/xfs/030.out.reflink.linux | 252 ++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 280 insertions(+), 5 deletions(-)
>  create mode 100644 tests/xfs/030.out.reflink.linux
> 
> diff --git a/common/reflink b/common/reflink
> index 4ec390d..bdfc01c 100644
> --- a/common/reflink
> +++ b/common/reflink
> @@ -156,6 +156,24 @@ _cp_reflink() {
>  	cp --reflink=always -p "$file1" "$file2"
>  }
>  
> +# given a mount point and test the underlying fs supports reflink or not
> +_fs_has_reflink()
> +{
> +	if [ -z $1 ] || [ ! -d $1 ]; then
> +		echo "Missing mount point argument for _fs_has_reflink()"
> +		exit 1
> +	fi
> +	local src=$1/_fs_has_reflink_testfile
> +	local tgt=$src.reflink
> +	local ret=0
> +
> +	echo "reflink test" > $src
> +	_cp_reflink $src $tgt >/dev/null 2>&1
> +	ret=$?
> +	rm -f $src $tgt >/dev/null 2>&1
> +	return $ret
> +}

Patch looks ok, though I wonder if _require_*_reflink ought to be
refactored to use this?

--D

> +
>  # Reflink some file1 into file2
>  _reflink() {
>  	file1="$1"
> diff --git a/tests/xfs/030 b/tests/xfs/030
> index 33c906c..d171a39 100755
> --- a/tests/xfs/030
> +++ b/tests/xfs/030
> @@ -44,9 +44,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
>  . ./common/rc
>  . ./common/filter
>  . ./common/repair
> -
> -# link correct .out file
> -_link_out_file
> +. ./common/reflink
>  
>  # nuke the superblock, AGI, AGF, AGFL; then try repair the damage
>  #
> @@ -90,6 +88,14 @@ else
>  		_notrun "GQuota are enabled, test needs controlled sb recovery"
>  	src/feature -P $SCRATCH_DEV && \
>  		_notrun "PQuota are enabled, test needs controlled sb recovery"
> +
> +	# link correct .out file
> +	features=`_get_os_name`
> +	if _fs_has_reflink $SCRATCH_MNT; then
> +		features=$feature,reflink
> +	fi
> +	_link_out_file_named $seqfull.out "$features"
> +
>  	_scratch_unmount
>  fi
>  clear=""
> diff --git a/tests/xfs/030.cfg b/tests/xfs/030.cfg
> index 7ffdfc0..1eacdc1 100644
> --- a/tests/xfs/030.cfg
> +++ b/tests/xfs/030.cfg
> @@ -1,2 +1,3 @@
>  irix: irix
> +linux,reflink: reflink.linux
>  linux: linux
> diff --git a/tests/xfs/030.out.linux b/tests/xfs/030.out.linux
> index 14b9b35..cf3259f 100644
> --- a/tests/xfs/030.out.linux
> +++ b/tests/xfs/030.out.linux
> @@ -231,8 +231,6 @@ bad agbno AGBNO in agfl, agno 0
>  bad agbno AGBNO in agfl, agno 0
>  bad agbno AGBNO in agfl, agno 0
>  bad agbno AGBNO in agfl, agno 0
> -bad agbno AGBNO in agfl, agno 0
> -bad agbno AGBNO in agfl, agno 0
>          - found root inode chunk
>  Phase 3 - for each AG...
>          - scan and clear agi unlinked lists...
> diff --git a/tests/xfs/030.out.reflink.linux b/tests/xfs/030.out.reflink.linux
> new file mode 100644
> index 0000000..14b9b35
> --- /dev/null
> +++ b/tests/xfs/030.out.reflink.linux
> @@ -0,0 +1,252 @@
> +QA output created by 030
> +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 sb 0 - setting bits to 0
> +Wrote X.XXKb (value 0x0)
> +Phase 1 - find and verify superblock...
> +bad primary superblock - bad magic number !!!
> +
> +attempting to find secondary superblock...
> +found candidate secondary superblock...
> +verified secondary superblock...
> +writing modified primary superblock
> +sb root inode value INO inconsistent with calculated value INO
> +resetting superblock root inode pointer to INO
> +sb realtime bitmap inode INO inconsistent with calculated value INO
> +resetting superblock realtime bitmap ino pointer to INO
> +sb realtime summary inode INO inconsistent with calculated value INO
> +resetting superblock realtime summary ino pointer to INO
> +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...
> +        - 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...
> +        - 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...
> +Note - stripe unit (0) and width (0) fields have been reset.
> +Please set with mount -o sunit=<value>,swidth=<value>
> +done
> +Corrupting agf 0 - 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...
> +bad magic # 0x0 for agf 0
> +bad version # 0 for agf 0
> +bad length 0 for agf 0, should be LENGTH
> +reset bad agf for ag 0
> +bad agbno AGBNO for btbno root, agno 0
> +bad agbno AGBNO for btbcnt root, agno 0
> +        - found root inode chunk
> +Phase 3 - for each AG...
> +        - scan and clear agi unlinked lists...
> +        - process known inodes and perform inode discovery...
> +        - 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...
> +        - 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 agi 0 - 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...
> +bad magic # 0x0 for agi 0
> +bad version # 0 for agi 0
> +bad length # 0 for agi 0, should be LENGTH
> +reset bad agi for ag 0
> +bad agbno AGBNO for inobt root, agno 0
> +root inode chunk not found
> +Phase 3 - for each AG...
> +        - scan and clear agi unlinked lists...
> +        - process known inodes and perform inode discovery...
> +        - 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...
> +        - 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 agfl 0 - 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...
> +        - 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...
> +        - 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 sb 0 - setting bits to -1
> +Wrote X.XXKb (value 0xffffffff)
> +Phase 1 - find and verify superblock...
> +bad primary superblock - bad magic number !!!
> +
> +attempting to find secondary superblock...
> +found candidate secondary superblock...
> +verified secondary superblock...
> +writing modified primary superblock
> +sb root inode value INO inconsistent with calculated value INO
> +resetting superblock root inode pointer to INO
> +sb realtime bitmap inode INO inconsistent with calculated value INO
> +resetting superblock realtime bitmap ino pointer to INO
> +sb realtime summary inode INO inconsistent with calculated value INO
> +resetting superblock realtime summary ino pointer to INO
> +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...
> +        - 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...
> +        - 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...
> +Note - stripe unit (0) and width (0) fields have been reset.
> +Please set with mount -o sunit=<value>,swidth=<value>
> +done
> +Corrupting agf 0 - 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...
> +bad magic # 0xffffffff for agf 0
> +bad version # -1 for agf 0
> +bad sequence # -1 for agf 0
> +bad length -1 for agf 0, should be LENGTH
> +flfirst -1 in agf 0 too large (max = MAX)
> +fllast -1 in agf 0 too large (max = MAX)
> +reset bad agf for ag 0
> +freeblk count 1 != flcount -1 in ag 0
> +bad agbno AGBNO for btbno root, agno 0
> +bad agbno AGBNO for btbcnt root, agno 0
> +        - found root inode chunk
> +Phase 3 - for each AG...
> +        - scan and clear agi unlinked lists...
> +        - process known inodes and perform inode discovery...
> +        - 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...
> +        - 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 agi 0 - 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...
> +bad magic # 0xffffffff for agi 0
> +bad version # -1 for agi 0
> +bad sequence # -1 for agi 0
> +bad length # -1 for agi 0, should be LENGTH
> +reset bad agi for ag 0
> +bad agbno AGBNO for inobt root, agno 0
> +root inode chunk not found
> +Phase 3 - for each AG...
> +        - scan and clear agi unlinked lists...
> +        - process known inodes and perform inode discovery...
> +        - 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...
> +        - 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 agfl 0 - 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...
> +bad agbno AGBNO in agfl, agno 0
> +bad agbno AGBNO in agfl, agno 0
> +bad agbno AGBNO in agfl, agno 0
> +bad agbno AGBNO in agfl, agno 0
> +bad agbno AGBNO in agfl, agno 0
> +bad agbno AGBNO in agfl, agno 0
> +        - found root inode chunk
> +Phase 3 - for each AG...
> +        - scan and clear agi unlinked lists...
> +        - process known inodes and perform inode discovery...
> +        - 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...
> +        - 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
> -- 
> 2.5.5
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] xfs/030: link .out file according to reflink support status
@ 2016-03-30 17:24   ` Darrick J. Wong
  0 siblings, 0 replies; 12+ messages in thread
From: Darrick J. Wong @ 2016-03-30 17:24 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests, xfs

On Wed, Mar 30, 2016 at 05:57:41PM +0800, Eryu Guan wrote:
> Commit 31f48569c353 ("xfs/030: fix output on newer filesystems") added
> more lines to .out file to match the output from XFS with reflink
> support, but it broke test on older XFS.
> 
> Fix it by introducing new .out file 030.out.reflink.linux to match the
> reflink case, so old XFS still compares .out file against 030.out.linux.
> 
> In order to do this, a new helper is introduced, _fs_has_reflink()
> accepts mount point as argument and returns if the underlying fs
> supports reflink or not.
> 
> Signed-off-by: Eryu Guan <eguan@redhat.com>
> ---
> 
> I didn't test this patch on newer XFS, but it did pass for me on current
> 4.6-rc1 kernel.
> 
>  common/reflink                  |  18 +++
>  tests/xfs/030                   |  12 +-
>  tests/xfs/030.cfg               |   1 +
>  tests/xfs/030.out.linux         |   2 -
>  tests/xfs/030.out.reflink.linux | 252 ++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 280 insertions(+), 5 deletions(-)
>  create mode 100644 tests/xfs/030.out.reflink.linux
> 
> diff --git a/common/reflink b/common/reflink
> index 4ec390d..bdfc01c 100644
> --- a/common/reflink
> +++ b/common/reflink
> @@ -156,6 +156,24 @@ _cp_reflink() {
>  	cp --reflink=always -p "$file1" "$file2"
>  }
>  
> +# given a mount point and test the underlying fs supports reflink or not
> +_fs_has_reflink()
> +{
> +	if [ -z $1 ] || [ ! -d $1 ]; then
> +		echo "Missing mount point argument for _fs_has_reflink()"
> +		exit 1
> +	fi
> +	local src=$1/_fs_has_reflink_testfile
> +	local tgt=$src.reflink
> +	local ret=0
> +
> +	echo "reflink test" > $src
> +	_cp_reflink $src $tgt >/dev/null 2>&1
> +	ret=$?
> +	rm -f $src $tgt >/dev/null 2>&1
> +	return $ret
> +}

Patch looks ok, though I wonder if _require_*_reflink ought to be
refactored to use this?

--D

> +
>  # Reflink some file1 into file2
>  _reflink() {
>  	file1="$1"
> diff --git a/tests/xfs/030 b/tests/xfs/030
> index 33c906c..d171a39 100755
> --- a/tests/xfs/030
> +++ b/tests/xfs/030
> @@ -44,9 +44,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
>  . ./common/rc
>  . ./common/filter
>  . ./common/repair
> -
> -# link correct .out file
> -_link_out_file
> +. ./common/reflink
>  
>  # nuke the superblock, AGI, AGF, AGFL; then try repair the damage
>  #
> @@ -90,6 +88,14 @@ else
>  		_notrun "GQuota are enabled, test needs controlled sb recovery"
>  	src/feature -P $SCRATCH_DEV && \
>  		_notrun "PQuota are enabled, test needs controlled sb recovery"
> +
> +	# link correct .out file
> +	features=`_get_os_name`
> +	if _fs_has_reflink $SCRATCH_MNT; then
> +		features=$feature,reflink
> +	fi
> +	_link_out_file_named $seqfull.out "$features"
> +
>  	_scratch_unmount
>  fi
>  clear=""
> diff --git a/tests/xfs/030.cfg b/tests/xfs/030.cfg
> index 7ffdfc0..1eacdc1 100644
> --- a/tests/xfs/030.cfg
> +++ b/tests/xfs/030.cfg
> @@ -1,2 +1,3 @@
>  irix: irix
> +linux,reflink: reflink.linux
>  linux: linux
> diff --git a/tests/xfs/030.out.linux b/tests/xfs/030.out.linux
> index 14b9b35..cf3259f 100644
> --- a/tests/xfs/030.out.linux
> +++ b/tests/xfs/030.out.linux
> @@ -231,8 +231,6 @@ bad agbno AGBNO in agfl, agno 0
>  bad agbno AGBNO in agfl, agno 0
>  bad agbno AGBNO in agfl, agno 0
>  bad agbno AGBNO in agfl, agno 0
> -bad agbno AGBNO in agfl, agno 0
> -bad agbno AGBNO in agfl, agno 0
>          - found root inode chunk
>  Phase 3 - for each AG...
>          - scan and clear agi unlinked lists...
> diff --git a/tests/xfs/030.out.reflink.linux b/tests/xfs/030.out.reflink.linux
> new file mode 100644
> index 0000000..14b9b35
> --- /dev/null
> +++ b/tests/xfs/030.out.reflink.linux
> @@ -0,0 +1,252 @@
> +QA output created by 030
> +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 sb 0 - setting bits to 0
> +Wrote X.XXKb (value 0x0)
> +Phase 1 - find and verify superblock...
> +bad primary superblock - bad magic number !!!
> +
> +attempting to find secondary superblock...
> +found candidate secondary superblock...
> +verified secondary superblock...
> +writing modified primary superblock
> +sb root inode value INO inconsistent with calculated value INO
> +resetting superblock root inode pointer to INO
> +sb realtime bitmap inode INO inconsistent with calculated value INO
> +resetting superblock realtime bitmap ino pointer to INO
> +sb realtime summary inode INO inconsistent with calculated value INO
> +resetting superblock realtime summary ino pointer to INO
> +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...
> +        - 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...
> +        - 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...
> +Note - stripe unit (0) and width (0) fields have been reset.
> +Please set with mount -o sunit=<value>,swidth=<value>
> +done
> +Corrupting agf 0 - 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...
> +bad magic # 0x0 for agf 0
> +bad version # 0 for agf 0
> +bad length 0 for agf 0, should be LENGTH
> +reset bad agf for ag 0
> +bad agbno AGBNO for btbno root, agno 0
> +bad agbno AGBNO for btbcnt root, agno 0
> +        - found root inode chunk
> +Phase 3 - for each AG...
> +        - scan and clear agi unlinked lists...
> +        - process known inodes and perform inode discovery...
> +        - 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...
> +        - 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 agi 0 - 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...
> +bad magic # 0x0 for agi 0
> +bad version # 0 for agi 0
> +bad length # 0 for agi 0, should be LENGTH
> +reset bad agi for ag 0
> +bad agbno AGBNO for inobt root, agno 0
> +root inode chunk not found
> +Phase 3 - for each AG...
> +        - scan and clear agi unlinked lists...
> +        - process known inodes and perform inode discovery...
> +        - 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...
> +        - 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 agfl 0 - 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...
> +        - 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...
> +        - 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 sb 0 - setting bits to -1
> +Wrote X.XXKb (value 0xffffffff)
> +Phase 1 - find and verify superblock...
> +bad primary superblock - bad magic number !!!
> +
> +attempting to find secondary superblock...
> +found candidate secondary superblock...
> +verified secondary superblock...
> +writing modified primary superblock
> +sb root inode value INO inconsistent with calculated value INO
> +resetting superblock root inode pointer to INO
> +sb realtime bitmap inode INO inconsistent with calculated value INO
> +resetting superblock realtime bitmap ino pointer to INO
> +sb realtime summary inode INO inconsistent with calculated value INO
> +resetting superblock realtime summary ino pointer to INO
> +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...
> +        - 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...
> +        - 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...
> +Note - stripe unit (0) and width (0) fields have been reset.
> +Please set with mount -o sunit=<value>,swidth=<value>
> +done
> +Corrupting agf 0 - 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...
> +bad magic # 0xffffffff for agf 0
> +bad version # -1 for agf 0
> +bad sequence # -1 for agf 0
> +bad length -1 for agf 0, should be LENGTH
> +flfirst -1 in agf 0 too large (max = MAX)
> +fllast -1 in agf 0 too large (max = MAX)
> +reset bad agf for ag 0
> +freeblk count 1 != flcount -1 in ag 0
> +bad agbno AGBNO for btbno root, agno 0
> +bad agbno AGBNO for btbcnt root, agno 0
> +        - found root inode chunk
> +Phase 3 - for each AG...
> +        - scan and clear agi unlinked lists...
> +        - process known inodes and perform inode discovery...
> +        - 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...
> +        - 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 agi 0 - 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...
> +bad magic # 0xffffffff for agi 0
> +bad version # -1 for agi 0
> +bad sequence # -1 for agi 0
> +bad length # -1 for agi 0, should be LENGTH
> +reset bad agi for ag 0
> +bad agbno AGBNO for inobt root, agno 0
> +root inode chunk not found
> +Phase 3 - for each AG...
> +        - scan and clear agi unlinked lists...
> +        - process known inodes and perform inode discovery...
> +        - 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...
> +        - 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 agfl 0 - 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...
> +bad agbno AGBNO in agfl, agno 0
> +bad agbno AGBNO in agfl, agno 0
> +bad agbno AGBNO in agfl, agno 0
> +bad agbno AGBNO in agfl, agno 0
> +bad agbno AGBNO in agfl, agno 0
> +bad agbno AGBNO in agfl, agno 0
> +        - found root inode chunk
> +Phase 3 - for each AG...
> +        - scan and clear agi unlinked lists...
> +        - process known inodes and perform inode discovery...
> +        - 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...
> +        - 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
> -- 
> 2.5.5
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] xfs/030: link .out file according to reflink support status
  2016-03-30  9:57 ` Eryu Guan
@ 2016-03-31  4:26   ` Dave Chinner
  -1 siblings, 0 replies; 12+ messages in thread
From: Dave Chinner @ 2016-03-31  4:26 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests, darrick.wong, xfs

On Wed, Mar 30, 2016 at 05:57:41PM +0800, Eryu Guan wrote:
> Commit 31f48569c353 ("xfs/030: fix output on newer filesystems") added
> more lines to .out file to match the output from XFS with reflink
> support, but it broke test on older XFS.
> 
> Fix it by introducing new .out file 030.out.reflink.linux to match the
> reflink case, so old XFS still compares .out file against 030.out.linux.
> 
> In order to do this, a new helper is introduced, _fs_has_reflink()
> accepts mount point as argument and returns if the underlying fs
> supports reflink or not.

Let's not go down this path. This is a filtering issue, not a
problem we solve by playing "let's add a golden image file for every
different filesystem format we can create".

The problem here is that reflink triggers a change in the initial
population of the AGFL - from 4 blocks to 6 blocks, and so repair
warns 6 times instead of 4. After filtering, that gives 6 indentical
output lines instead of 4.

Doing something as simple as collapsing repeated identical lines
(e.g filtering through uniq) will work for all filesystem formats
and any future changes that modify the initial AGFL population...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] xfs/030: link .out file according to reflink support status
@ 2016-03-31  4:26   ` Dave Chinner
  0 siblings, 0 replies; 12+ messages in thread
From: Dave Chinner @ 2016-03-31  4:26 UTC (permalink / raw)
  To: Eryu Guan; +Cc: xfs, fstests, darrick.wong

On Wed, Mar 30, 2016 at 05:57:41PM +0800, Eryu Guan wrote:
> Commit 31f48569c353 ("xfs/030: fix output on newer filesystems") added
> more lines to .out file to match the output from XFS with reflink
> support, but it broke test on older XFS.
> 
> Fix it by introducing new .out file 030.out.reflink.linux to match the
> reflink case, so old XFS still compares .out file against 030.out.linux.
> 
> In order to do this, a new helper is introduced, _fs_has_reflink()
> accepts mount point as argument and returns if the underlying fs
> supports reflink or not.

Let's not go down this path. This is a filtering issue, not a
problem we solve by playing "let's add a golden image file for every
different filesystem format we can create".

The problem here is that reflink triggers a change in the initial
population of the AGFL - from 4 blocks to 6 blocks, and so repair
warns 6 times instead of 4. After filtering, that gives 6 indentical
output lines instead of 4.

Doing something as simple as collapsing repeated identical lines
(e.g filtering through uniq) will work for all filesystem formats
and any future changes that modify the initial AGFL population...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] xfs/030: link .out file according to reflink support status
  2016-03-31  4:26   ` Dave Chinner
@ 2016-03-31  5:56     ` Eryu Guan
  -1 siblings, 0 replies; 12+ messages in thread
From: Eryu Guan @ 2016-03-31  5:56 UTC (permalink / raw)
  To: Dave Chinner; +Cc: xfs, fstests, darrick.wong

On Thu, Mar 31, 2016 at 03:26:44PM +1100, Dave Chinner wrote:
> On Wed, Mar 30, 2016 at 05:57:41PM +0800, Eryu Guan wrote:
> > Commit 31f48569c353 ("xfs/030: fix output on newer filesystems") added
> > more lines to .out file to match the output from XFS with reflink
> > support, but it broke test on older XFS.
> > 
> > Fix it by introducing new .out file 030.out.reflink.linux to match the
> > reflink case, so old XFS still compares .out file against 030.out.linux.
> > 
> > In order to do this, a new helper is introduced, _fs_has_reflink()
> > accepts mount point as argument and returns if the underlying fs
> > supports reflink or not.
> 
> Let's not go down this path. This is a filtering issue, not a
> problem we solve by playing "let's add a golden image file for every
> different filesystem format we can create".
> 
> The problem here is that reflink triggers a change in the initial
> population of the AGFL - from 4 blocks to 6 blocks, and so repair
> warns 6 times instead of 4. After filtering, that gives 6 indentical
> output lines instead of 4.
> 
> Doing something as simple as collapsing repeated identical lines
> (e.g filtering through uniq) will work for all filesystem formats
> and any future changes that modify the initial AGFL population...

I thought about filtering at first, but didn't find a way to filter out
the extra two lines easily. Collapsing repeaded lines into one will do.
I'll send out v2 shortly. Thanks for reviewing!

Eryu

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] xfs/030: link .out file according to reflink support status
@ 2016-03-31  5:56     ` Eryu Guan
  0 siblings, 0 replies; 12+ messages in thread
From: Eryu Guan @ 2016-03-31  5:56 UTC (permalink / raw)
  To: Dave Chinner; +Cc: darrick.wong, fstests, xfs

On Thu, Mar 31, 2016 at 03:26:44PM +1100, Dave Chinner wrote:
> On Wed, Mar 30, 2016 at 05:57:41PM +0800, Eryu Guan wrote:
> > Commit 31f48569c353 ("xfs/030: fix output on newer filesystems") added
> > more lines to .out file to match the output from XFS with reflink
> > support, but it broke test on older XFS.
> > 
> > Fix it by introducing new .out file 030.out.reflink.linux to match the
> > reflink case, so old XFS still compares .out file against 030.out.linux.
> > 
> > In order to do this, a new helper is introduced, _fs_has_reflink()
> > accepts mount point as argument and returns if the underlying fs
> > supports reflink or not.
> 
> Let's not go down this path. This is a filtering issue, not a
> problem we solve by playing "let's add a golden image file for every
> different filesystem format we can create".
> 
> The problem here is that reflink triggers a change in the initial
> population of the AGFL - from 4 blocks to 6 blocks, and so repair
> warns 6 times instead of 4. After filtering, that gives 6 indentical
> output lines instead of 4.
> 
> Doing something as simple as collapsing repeated identical lines
> (e.g filtering through uniq) will work for all filesystem formats
> and any future changes that modify the initial AGFL population...

I thought about filtering at first, but didn't find a way to filter out
the extra two lines easily. Collapsing repeaded lines into one will do.
I'll send out v2 shortly. Thanks for reviewing!

Eryu

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2] xfs/030: filter out repeated lines from .out files
  2016-03-30  9:57 ` Eryu Guan
@ 2016-03-31  6:11   ` Eryu Guan
  -1 siblings, 0 replies; 12+ messages in thread
From: Eryu Guan @ 2016-03-31  6:11 UTC (permalink / raw)
  To: fstests; +Cc: xfs, darrick.wong, Eryu Guan

Commit 31f48569c353 ("xfs/030: fix output on newer filesystems") added
more lines to .out file to match the output from XFS with reflink
support, but it broke test on older XFS.

Dave explained the reason and pointed out the correct way to fix it, so
I just quote Dave's mail here:

"The problem here is that reflink triggers a change in the initial
population of the AGFL - from 4 blocks to 6 blocks, and so repair warns
6 times instead of 4. After filtering, that gives 6 indentical output
lines instead of 4.

Doing something as simple as collapsing repeated identical lines (e.g
filtering through uniq) will work for all filesystem formats and any
future changes that modify the initial AGFL population."

Suggested-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
---
 tests/xfs/030           | 2 +-
 tests/xfs/030.out.irix  | 3 ---
 tests/xfs/030.out.linux | 5 -----
 3 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/tests/xfs/030 b/tests/xfs/030
index 33c906c..5c99d9e 100755
--- a/tests/xfs/030
+++ b/tests/xfs/030
@@ -55,7 +55,7 @@ _check_ag()
 	for structure in 'sb 0' 'agf 0' 'agi 0' 'agfl 0'
 	do
 		echo "Corrupting $structure - setting bits to $1"
-		_check_repair $1 "$structure" |
+		_check_repair $1 "$structure" | uniq |
 			sed -e '/^error following ag 0 unlinked list$/d' \
 			    -e '/^bad agbno AGBNO for finobt/d' \
 			    -e '/^bad agbno AGBNO for rmapbt/d' \
diff --git a/tests/xfs/030.out.irix b/tests/xfs/030.out.irix
index 6378c73..56adfd0 100644
--- a/tests/xfs/030.out.irix
+++ b/tests/xfs/030.out.irix
@@ -263,9 +263,6 @@ Phase 1 - find and verify superblock...
 Phase 2 - zero log...
         - scan filesystem freespace and inode maps...
 bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
         - found root inode chunk
 Phase 3 - for each AG...
         - scan and clear agi unlinked lists...
diff --git a/tests/xfs/030.out.linux b/tests/xfs/030.out.linux
index 14b9b35..722cabf 100644
--- a/tests/xfs/030.out.linux
+++ b/tests/xfs/030.out.linux
@@ -228,11 +228,6 @@ Phase 2 - using <TYPEOF> log
         - zero log...
         - scan filesystem freespace and inode maps...
 bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
         - found root inode chunk
 Phase 3 - for each AG...
         - scan and clear agi unlinked lists...
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2] xfs/030: filter out repeated lines from .out files
@ 2016-03-31  6:11   ` Eryu Guan
  0 siblings, 0 replies; 12+ messages in thread
From: Eryu Guan @ 2016-03-31  6:11 UTC (permalink / raw)
  To: fstests; +Cc: darrick.wong, Eryu Guan, xfs

Commit 31f48569c353 ("xfs/030: fix output on newer filesystems") added
more lines to .out file to match the output from XFS with reflink
support, but it broke test on older XFS.

Dave explained the reason and pointed out the correct way to fix it, so
I just quote Dave's mail here:

"The problem here is that reflink triggers a change in the initial
population of the AGFL - from 4 blocks to 6 blocks, and so repair warns
6 times instead of 4. After filtering, that gives 6 indentical output
lines instead of 4.

Doing something as simple as collapsing repeated identical lines (e.g
filtering through uniq) will work for all filesystem formats and any
future changes that modify the initial AGFL population."

Suggested-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
---
 tests/xfs/030           | 2 +-
 tests/xfs/030.out.irix  | 3 ---
 tests/xfs/030.out.linux | 5 -----
 3 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/tests/xfs/030 b/tests/xfs/030
index 33c906c..5c99d9e 100755
--- a/tests/xfs/030
+++ b/tests/xfs/030
@@ -55,7 +55,7 @@ _check_ag()
 	for structure in 'sb 0' 'agf 0' 'agi 0' 'agfl 0'
 	do
 		echo "Corrupting $structure - setting bits to $1"
-		_check_repair $1 "$structure" |
+		_check_repair $1 "$structure" | uniq |
 			sed -e '/^error following ag 0 unlinked list$/d' \
 			    -e '/^bad agbno AGBNO for finobt/d' \
 			    -e '/^bad agbno AGBNO for rmapbt/d' \
diff --git a/tests/xfs/030.out.irix b/tests/xfs/030.out.irix
index 6378c73..56adfd0 100644
--- a/tests/xfs/030.out.irix
+++ b/tests/xfs/030.out.irix
@@ -263,9 +263,6 @@ Phase 1 - find and verify superblock...
 Phase 2 - zero log...
         - scan filesystem freespace and inode maps...
 bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
         - found root inode chunk
 Phase 3 - for each AG...
         - scan and clear agi unlinked lists...
diff --git a/tests/xfs/030.out.linux b/tests/xfs/030.out.linux
index 14b9b35..722cabf 100644
--- a/tests/xfs/030.out.linux
+++ b/tests/xfs/030.out.linux
@@ -228,11 +228,6 @@ Phase 2 - using <TYPEOF> log
         - zero log...
         - scan filesystem freespace and inode maps...
 bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
-bad agbno AGBNO in agfl, agno 0
         - found root inode chunk
 Phase 3 - for each AG...
         - scan and clear agi unlinked lists...
-- 
2.5.5

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] xfs/030: filter out repeated lines from .out files
  2016-03-31  6:11   ` Eryu Guan
@ 2016-03-31  7:05     ` Christoph Hellwig
  -1 siblings, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2016-03-31  7:05 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests, xfs, darrick.wong

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] xfs/030: filter out repeated lines from .out files
@ 2016-03-31  7:05     ` Christoph Hellwig
  0 siblings, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2016-03-31  7:05 UTC (permalink / raw)
  To: Eryu Guan; +Cc: darrick.wong, fstests, xfs

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-03-31  7:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-30  9:57 [PATCH] xfs/030: link .out file according to reflink support status Eryu Guan
2016-03-30  9:57 ` Eryu Guan
2016-03-30 17:24 ` Darrick J. Wong
2016-03-30 17:24   ` Darrick J. Wong
2016-03-31  4:26 ` Dave Chinner
2016-03-31  4:26   ` Dave Chinner
2016-03-31  5:56   ` Eryu Guan
2016-03-31  5:56     ` Eryu Guan
2016-03-31  6:11 ` [PATCH v2] xfs/030: filter out repeated lines from .out files Eryu Guan
2016-03-31  6:11   ` Eryu Guan
2016-03-31  7:05   ` Christoph Hellwig
2016-03-31  7:05     ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.