diff mbox series

[6/8] xfs/070: filter the bad sb magic number error

Message ID 20220602003126.2903779-7-david@fromorbit.com (mailing list archive)
State New, archived
Headers show
Series [1/8] xfstests: Add Log Attribute Replay test | expand

Commit Message

Dave Chinner June 2, 2022, 12:31 a.m. UTC
From: Dave Chinner <dchinner@redhat.com>

Lastest XFS kernel makes the superblock bad magic number error
message more meaningful, and that's being picked up by xfsprogs in
very short order. And, of course, the error is output by xfs_repair,
too, and it's been captured in the golden output of a test. Fix it
by filtering the output back down to the old message.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
 common/repair | 1 +
 1 file changed, 1 insertion(+)

Comments

Darrick J. Wong June 2, 2022, 12:52 a.m. UTC | #1
On Thu, Jun 02, 2022 at 10:31:24AM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> Lastest XFS kernel makes the superblock bad magic number error
> message more meaningful, and that's being picked up by xfsprogs in
> very short order. And, of course, the error is output by xfs_repair,
> too, and it's been captured in the golden output of a test. Fix it
> by filtering the output back down to the old message.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>

Heh, I had a patch just like this one!
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  common/repair | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/common/repair b/common/repair
> index 5a957f4e..463ef9db 100644
> --- a/common/repair
> +++ b/common/repair
> @@ -90,6 +90,7 @@ s/(superblock) (\d+)/\1 AGNO/;
>  s/(AG \#)(\d+)/\1AGNO/;
>  s/(reset bad sb for ag) (\d+)/\1 AGNO/;
>  s/(unknown block state, ag )(\d+)(, blocks? )(\d+)/\1AGNO\3AGBNO/;
> +s/^Superblock has (bad magic number) 0x.*/\1/;
>  /^Note - quota info will be regenerated on next quota mount.$/ && next;
>  	print;'
>  }
> -- 
> 2.35.1
>
diff mbox series

Patch

diff --git a/common/repair b/common/repair
index 5a957f4e..463ef9db 100644
--- a/common/repair
+++ b/common/repair
@@ -90,6 +90,7 @@  s/(superblock) (\d+)/\1 AGNO/;
 s/(AG \#)(\d+)/\1AGNO/;
 s/(reset bad sb for ag) (\d+)/\1 AGNO/;
 s/(unknown block state, ag )(\d+)(, blocks? )(\d+)/\1AGNO\3AGBNO/;
+s/^Superblock has (bad magic number) 0x.*/\1/;
 /^Note - quota info will be regenerated on next quota mount.$/ && next;
 	print;'
 }