@@ -95,9 +95,18 @@ s/(stripe unit) \(.*\) (and width) \(.*\)/\1 (SU) \2 (SW)/;
s/(superblock) (\d+)/\1 AGNO/;
s/(AG \#)(\d+)/\1AGNO/;
s/(reset bad sb for ag) (\d+)/\1 AGNO/;
+s/(unknown block state, ag )(\d+)(, block )(\d+)/\1AGNO\3AGBNO/;
print;'
}
+# Filter out unknown block state messages that appear when rmap is enabled
+# and we erase a btree root pointer (such that repair never finds the
+# tree and fails to reconcile the metadata reverse mappings against the
+# metadata).
+_filter_repair_lostblocks() {
+ _filter_repair | sed -e '/unknown block state, ag AGNO, block AGBNO/d'
+}
+
_filter_dd()
{
fgrep -v records # lose records in/out lines
@@ -129,7 +129,7 @@ _check_scratch_fs
# nuke the finobt root, repair will have to regenerate from the inobt
_corrupt_finobt_root $SCRATCH_DEV
-_scratch_xfs_repair 2>&1 | _filter_repair
+_scratch_xfs_repair 2>&1 | _filter_repair_lostblocks
status=0
exit
@@ -58,7 +58,7 @@ _check_ag()
-e '/^bad agbno AGBNO for rmapbt/d' \
-e '/^bad agbno AGBNO for refcntbt/d' \
-e '/^Missing reverse-mapping record.*/d' \
- -e '/^unknown block state, ag 0, block.*/d'
+ -e '/^unknown block state, ag AGNO, block.*/d'
done
}