Skip to contentSkip to conversation

030: fix for new xfs_repair versions

PATCH In review Christoph Hellwig 3 participants 6 messages Mar 31, 2012 – May 23, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 030: fix for new xfs_repair versions

Given that we now drop invalid unlinked inode lists there is no message to capture. Also add a sed expression to avoid failures on old repair versions.

030 +3 -3
Index: xfstests-dev/030
===================================================================
@@ -55,7 +55,8 @@ _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" |
+			sed -e 's/error following ag 0 unlinked list//'
 	done
 }
 
@@ -97,8 +98,7 @@ src/devzero -v -1 -n "$clear" $SCRATCH_D
 
 # now kick off the real repair test...
 #
-_scratch_mkfs_xfs $DSIZE | _filter_mkfs | \
-    sed -e 's/error following ag 0 unlinked list//' 2>$tmp.mkfs
+_scratch_mkfs_xfs $DSIZE | _filter_mkfs 2>$tmp.mkfs
 . $tmp.mkfs
 _check_ag 0
 _check_ag -1
030.out.linux +0 -1
Index: xfstests-dev/030.out.linux
===================================================================
@@ -85,7 +85,6 @@ bad agbno AGBNO for inobt root, agno 0
 root inode chunk not found
 Phase 3 - for each AG...
         - scan and clear agi unlinked lists...
-error following ag 0 unlinked list
         - process known inodes and perform inode discovery...
         - process newly discovered inodes...
 Phase 4 - check for duplicate blocks...

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#1 lore raw
Quoted 43 lines · Christoph Hellwig

Given that we now drop invalid unlinked inode lists there is no message to capture. Also add a sed expression to avoid failures on old repair versions.

Index: xfstests-dev/030
===================================================================

030 +3 -3
@@ -55,7 +55,8 @@ _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" |
+			sed -e 's/error following ag 0 unlinked list//'
  	done
  }
 
@@ -97,8 +98,7 @@ src/devzero -v -1 -n "$clear" $SCRATCH_D
 
  # now kick off the real repair test...
  #
-_scratch_mkfs_xfs $DSIZE | _filter_mkfs | \
-    sed -e 's/error following ag 0 unlinked list//' 2>$tmp.mkfs
+_scratch_mkfs_xfs $DSIZE | _filter_mkfs 2>$tmp.mkfs
  . $tmp.mkfs
  _check_ag 0
  _check_ag -1

Index: xfstests-dev/030.out.linux
===================================================================

030.out.linux +0 -1
@@ -85,7 +85,6 @@ bad agbno AGBNO for inobt root, agno 0
  root inode chunk not found
  Phase 3 - for each AG...
          - scan and clear agi unlinked lists...
-error following ag 0 unlinked list
          - process known inodes and perform inode discovery...
          - process newly discovered inodes...
  Phase 4 - check for duplicate blocks...
Quoted 4 lines

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

The sed left a blank line where where the "error following ag 0 unlinked list" would have been in an 3.0.x kernel run of the test.

Maybe add another "sed -e '/^$/d'" to the filter?

--Mark Tinguely <[email protected]>

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#2 lore raw
In reply to Christoph Hellwig
Quoted 6 lines · Christoph Hellwig

Given that we now drop invalid unlinked inode lists there is no message to capture. Also add a sed expression to avoid failures on old repair versions.

This is something that worked on an older OS:

---
 030           |    3 ++-
 030.out.linux |    1 -
 2 files changed, 2 insertions(+), 2 deletions(-)
030 +2 -1
Index: b/030
===================================================================
@@ -55,7 +55,8 @@ _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" |
+			sed -e '/^error following ag 0 unlinked list$/d'
 	done
 }
 
030.out.linux +0 -1
Index: b/030.out.linux
===================================================================
@@ -85,7 +85,6 @@ bad agbno AGBNO for inobt root, agno 0
 root inode chunk not found
 Phase 3 - for each AG...
         - scan and clear agi unlinked lists...
-error following ag 0 unlinked list
         - process known inodes and perform inode discovery...
         - process newly discovered inodes...
 Phase 4 - check for duplicate blocks...

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#3 lore raw
Quoted 44 lines · Mark Tinguely
Quoted 6 lines · Christoph Hellwig

Given that we now drop invalid unlinked inode lists there is no message to capture. Also add a sed expression to avoid failures on old repair versions.

This is something that worked on an older OS:

---
030 | 3 ++-
030.out.linux | 1 -

2 files changed, 2 insertions(+), 2 deletions(-)

Index: b/030
===================================================================

030 +0 -0
@@ -55,7 +55,8 @@ _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" |
+ sed -e '/^error following ag 0 unlinked list$/d' done
}

Index: b/030.out.linux
===================================================================

030.out.linux +0 -0
@@ -85,7 +85,6 @@ bad agbno AGBNO for inobt root, agno 0

root inode chunk not found
Phase 3 - for each AG...
- scan and clear agi unlinked lists...
-error following ag 0 unlinked list
- process known inodes and perform inode discovery...
- process newly discovered inodes...
Phase 4 - check for duplicate blocks...

Quoted 4 lines

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

ping.

People are still listing 030 as broken. We should get this fixed.

--Mark Tinguely

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs