From: Darrick J. Wong Date: Fri, 10 Jul 2020 19:35:46 +0000 (-0400) Subject: xfs_repair: complain about ag header crc errors X-Git-Tag: xfsprogs-5.7-fixes_2020-07-14~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a891d871ee17680c12ebf57782fb8322f28e4247;p=thirdparty%2Fxfsprogs-dev.git xfs_repair: complain about ag header crc errors Repair doesn't complain about crc errors in the AG headers, and it should. Otherwise, this gives the admin the wrong impression about the state of the filesystem after a nomodify check. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Allison Collins Reviewed-by: Christoph Hellwig Signed-off-by: Eric Sandeen --- diff --git a/repair/scan.c b/repair/scan.c index 505cfc533..42b299f75 100644 --- a/repair/scan.c +++ b/repair/scan.c @@ -2441,6 +2441,8 @@ scan_ag( objname = _("root superblock"); goto out_free_sb; } + if (sbbuf->b_error == -EFSBADCRC) + do_warn(_("superblock has bad CRC for ag %d\n"), agno); libxfs_sb_from_disk(sb, sbbuf->b_addr); error = salvage_buffer(mp->m_dev, @@ -2450,6 +2452,8 @@ scan_ag( objname = _("agf block"); goto out_free_sbbuf; } + if (agfbuf->b_error == -EFSBADCRC) + do_warn(_("agf has bad CRC for ag %d\n"), agno); agf = agfbuf->b_addr; error = salvage_buffer(mp->m_dev, @@ -2459,6 +2463,8 @@ scan_ag( objname = _("agi block"); goto out_free_agfbuf; } + if (agibuf->b_error == -EFSBADCRC) + do_warn(_("agi has bad CRC for ag %d\n"), agno); agi = agibuf->b_addr; /* fix up bad ag headers */