mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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 <darrick.wong@oracle.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
committed by
Eryu Guan
parent
8b190e89fd
commit
b934adce93
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user