diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-07-14 11:05:54 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2022-10-14 14:16:35 -0700 |
commit | d4377884f2e957119c09b9233ff694d035ea99ca (patch) | |
tree | 1ab0332461d23745cca4b493ba2e82a109250f46 /fs/xfs/scrub/agheader_repair.c | |
parent | 2990c44ce313fce227a0d7a832d8ac4e722aed8b (diff) |
xfs: rearrange xrep_reap_block to make future code flow easier
Rearrange the logic inside xrep_reap_block to make it more obvious that
crosslinked metadata blocks are handled differently. Add a couple of
tracepoints so that we can tell what's going on at the end of a btree
rebuild operation.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub/agheader_repair.c')
-rw-r--r-- | fs/xfs/scrub/agheader_repair.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/scrub/agheader_repair.c b/fs/xfs/scrub/agheader_repair.c index 53863560ab0f..629f2a681485 100644 --- a/fs/xfs/scrub/agheader_repair.c +++ b/fs/xfs/scrub/agheader_repair.c @@ -645,13 +645,13 @@ xrep_agfl_fill( xfs_fsblock_t fsbno = start; int error; + trace_xrep_agfl_insert(sc->sa.pag, XFS_FSB_TO_AGBNO(sc->mp, start), + len); + while (fsbno < start + len && af->fl_off < af->flcount) af->agfl_bno[af->fl_off++] = cpu_to_be32(XFS_FSB_TO_AGBNO(sc->mp, fsbno++)); - trace_xrep_agfl_insert(sc->mp, sc->sa.pag->pag_agno, - XFS_FSB_TO_AGBNO(sc->mp, start), len); - error = xbitmap_set(&af->used_extents, start, fsbno - 1); if (error) return error; |