common/repair: filter unknown block state properly

xfsprogs 32e11be9 ("xfs_repair: complain about extents in unknown
state") changed the xfs_repair output format as below:

  - _("unknown block state, ag %d, block %d\n"),
  -         i, j);
  + _("unknown block state, ag %d, blocks %u-%u\n"),
  +         i, j, j + blen - 1);

It replaces "block" with "blocks". That cause xfs/030 fails. So use
proper regex to filter the 'old' and 'new' output format both.

Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Zorro Lang
2020-10-27 12:26:52 +08:00
committed by Eryu Guan
parent 31f6949f38
commit f81829d98c
+2 -2
View File
@@ -88,7 +88,7 @@ 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/;
s/(unknown block state, ag )(\d+)(, blocks? )(\d+)/\1AGNO\3AGBNO/;
/^Note - quota info will be regenerated on next quota mount.$/ && next;
print;'
}
@@ -98,7 +98,7 @@ s/(unknown block state, ag )(\d+)(, block )(\d+)/\1AGNO\3AGBNO/;
# 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_repair | sed -e '/unknown block state, ag AGNO, blocks* AGBNO/d'
}
_filter_dd()