Merge of master-melb:xfs-cmds:28770a by kenmcd.
Make sure the repair tests dirty the filesystem before corrupting it.
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...
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...
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...
{
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