Make sure the repair tests dirty the filesystem before corrupting it.

Merge of master-melb:xfs-cmds:28770a by kenmcd.

  Make sure the repair tests dirty the filesystem before corrupting it.
This commit is contained in:
Dave Chinner
2007-06-04 06:12:42 +00:00
parent 707df41353
commit b4b13ee325
4 changed files with 22 additions and 0 deletions
+4
View File
@@ -262,6 +262,10 @@ Wrote X.XXKb (value 0xffffffff)
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...
+4
View File
@@ -270,6 +270,10 @@ 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
- found root inode chunk
Phase 3 - for each AG...
- scan and clear agi unlinked lists...
+4
View File
@@ -270,6 +270,10 @@ 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
- found root inode chunk
Phase 3 - for each AG...
- scan and clear agi unlinked lists...
+10
View File
@@ -72,8 +72,18 @@ _check_repair()
{
value=$1
structure="$2"
#ensure the filesystem has been dirtied since last repair
_scratch_mount
POSIXLY_CORRECT=yes \
dd if=/bin/sh of=$SCRATCH_MNT/sh 2>&1 |_filter_dd
sync
rm -f $SCRATCH_MNT/sh
umount $SCRATCH_MNT
_zero_position $value "$structure"
_scratch_xfs_repair 2>&1 | _filter_repair
# some basic sanity checks...
_check_scratch_fs
_scratch_mount #mount