diff mbox series

[4/6] xfs_scrub: log when a repair was unnecessary

Message ID 167243869077.714771.263719638960610884.stgit@magnolia (mailing list archive)
State Superseded
Headers show
Series xfs_scrub: fixes to the repair code | expand

Commit Message

Darrick J. Wong Dec. 30, 2022, 10:18 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

If the kernel tells us that a filesystem object didn't need repairs, we
should log that with a message specific to that outcome.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 scrub/repair.c |    4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/scrub/repair.c b/scrub/repair.c
index a6fbdcb638d..1ca8331bb04 100644
--- a/scrub/repair.c
+++ b/scrub/repair.c
@@ -165,6 +165,10 @@  _("Read-only filesystem; cannot make changes."));
  _("Seems correct but cross-referencing failed; will keep checking."));
 			return CHECK_RETRY;
 		}
+	} else if (meta.sm_flags & XFS_SCRUB_OFLAG_NO_REPAIR_NEEDED) {
+		if (verbose)
+			str_info(ctx, descr_render(&dsc),
+					_("No modification needed."));
 	} else {
 		/* Clean operation, no corruption detected. */
 		if (needs_repair(&oldm))