xfs: roll the scrub transaction after completing a repair
authorDarrick J. Wong <djwong@kernel.org>
Fri, 15 Dec 2023 18:03:31 +0000 (10:03 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 15 Dec 2023 18:03:31 +0000 (10:03 -0800)
commitefb43b355457dab474c7eb40d6b2f3cb04c24ecf
treed98f612d0905b179be6f1fb5d6f9de200416609b
parent0f08af0f9f3eb4a67fa3849c63e918bac9773da8
xfs: roll the scrub transaction after completing a repair

When we've finished repairing an AG header, roll the scrub transaction.
This ensure that any failures caused by defer ops failing are captured
by the xrep_done tracepoint and that any stacktraces that occur will
point to the repair code that caused it, instead of xchk_teardown.

Going forward, repair functions should commit the transaction if they're
going to return success.  Usually the space reaping functions that run
after a successful atomic commit of the new metadata will take care of
that for us.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/agheader_repair.c