* [PATCH] common/repair: filter unknown block state properly
@ 2020-10-27 4:26 Zorro Lang
2020-10-27 16:34 ` Darrick J. Wong
0 siblings, 1 reply; 2+ messages in thread
From: Zorro Lang @ 2020-10-27 4:26 UTC (permalink / raw)
To: fstests
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>
---
common/repair | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/repair b/common/repair
index 6668dd51..c8d16314 100644
--- a/common/repair
+++ b/common/repair
@@ -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()
--
2.25.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] common/repair: filter unknown block state properly
2020-10-27 4:26 [PATCH] common/repair: filter unknown block state properly Zorro Lang
@ 2020-10-27 16:34 ` Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2020-10-27 16:34 UTC (permalink / raw)
To: Zorro Lang; +Cc: fstests
On Tue, Oct 27, 2020 at 12:26:52PM +0800, Zorro Lang wrote:
> 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>
Aha, I had a patch to do exactly this sitting in my xfstests tree that I
never sent out.
Egad, I haven't sent much of anything since 5.6. I better get on that.
In the meantime,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
> common/repair | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/common/repair b/common/repair
> index 6668dd51..c8d16314 100644
> --- a/common/repair
> +++ b/common/repair
> @@ -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()
> --
> 2.25.4
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-27 16:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-27 4:26 [PATCH] common/repair: filter unknown block state properly Zorro Lang
2020-10-27 16:34 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox