summaryrefslogtreecommitdiffstats
path: root/fs/xfs/scrub
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-08-10 07:48:11 -0700
committerDarrick J. Wong <djwong@kernel.org>2023-08-10 07:48:11 -0700
commit9ce7f9b225b6052bfe50ebf255978a1806ab0472 (patch)
tree25221d5498bd3c651c2c48f2dc0bbfaa806e332f /fs/xfs/scrub
parent5c83df2e54b6af870e3e02ccd2a8ecd54e36668c (diff)
downloadlinux-9ce7f9b225b6052bfe50ebf255978a1806ab0472.tar.gz
linux-9ce7f9b225b6052bfe50ebf255978a1806ab0472.tar.bz2
linux-9ce7f9b225b6052bfe50ebf255978a1806ab0472.zip
xfs: clear pagf_agflreset when repairing the AGFL
Clear the pagf_agflreset flag when we're repairing the AGFL because we fix all the same padding problems that xfs_agfl_reset does. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/scrub')
-rw-r--r--fs/xfs/scrub/agheader_repair.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/xfs/scrub/agheader_repair.c b/fs/xfs/scrub/agheader_repair.c
index 3dda09b5ece5..6fbb31f933b4 100644
--- a/fs/xfs/scrub/agheader_repair.c
+++ b/fs/xfs/scrub/agheader_repair.c
@@ -620,8 +620,11 @@ xrep_agfl_update_agf(
xfs_force_summary_recalc(sc->mp);
/* Update the AGF counters. */
- if (xfs_perag_initialised_agf(sc->sa.pag))
+ if (xfs_perag_initialised_agf(sc->sa.pag)) {
sc->sa.pag->pagf_flcount = flcount;
+ clear_bit(XFS_AGSTATE_AGFL_NEEDS_RESET,
+ &sc->sa.pag->pag_opstate);
+ }
agf->agf_flfirst = cpu_to_be32(0);
agf->agf_flcount = cpu_to_be32(flcount);
agf->agf_fllast = cpu_to_be32(flcount - 1);