From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> Record the unknown block state messages that xfs_repair produces when we nuke the finobt. Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> --- common/repair | 9 +++++++++ tests/xfs/010 | 2 +- tests/xfs/030 | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/common/repair b/common/repair index 2b1583b..b569541 100644 --- a/common/repair +++ b/common/repair @@ -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 diff --git a/tests/xfs/010 b/tests/xfs/010 index b9f2891..17607d6 100755 --- a/tests/xfs/010 +++ b/tests/xfs/010 @@ -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 diff --git a/tests/xfs/030 b/tests/xfs/030 index bc80775..fcea754 100755 --- a/tests/xfs/030 +++ b/tests/xfs/030 @@ -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 } -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html