From: Darrick J. Wong Date: Wed, 1 Nov 2017 21:47:36 +0000 (-0700) Subject: xfs: filter and record the unknown block state messages X-Git-Tag: v2022.05.01~1800 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b934adce93a2b69421725f9b0c96ee6dbad954b3;p=xfstests-dev.git xfs: filter and record the unknown block state messages Record the unknown block state messages that xfs_repair produces when we nuke the finobt. Signed-off-by: Darrick J. Wong Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/common/repair b/common/repair index 2b1583b7..b5695413 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 b9f28915..17607d6d 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 bc807753..fcea7544 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 }