From b07c2ba5a20383f0c58870112ecac7c0fe0bf46f Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Wed, 1 Aug 2018 17:06:44 -0500 Subject: [PATCH] xfs_scrub: don't error out if an optimize-only repair isn't supported If the kernel told us a metadata object could be optimized, we ask it to do the optimization and it spits back that it doesn't support optimizing, don't record this as an error since the fs is still consistent. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Signed-off-by: Eric Sandeen --- scrub/scrub.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scrub/scrub.c b/scrub/scrub.c index 61caff9b0..36f5a2d56 100644 --- a/scrub/scrub.c +++ b/scrub/scrub.c @@ -768,10 +768,11 @@ _("Filesystem is shut down, aborting.")); case ENOTTY: case EOPNOTSUPP: /* - * If we forced repairs, don't complain if kernel - * doesn't know how to fix. + * If we forced repairs or this is a preen, don't + * error out if the kernel doesn't know how to fix. */ - if (debug_tweak_on("XFS_SCRUB_FORCE_REPAIR")) + if (is_unoptimized(&oldm) || + debug_tweak_on("XFS_SCRUB_FORCE_REPAIR")) return CHECK_DONE; /* fall through */ case EINVAL: -- 2.47.2