From: Darrick J. Wong Date: Wed, 1 Aug 2018 22:06:44 +0000 (-0500) Subject: xfs_scrub: don't error out if an optimize-only repair isn't supported X-Git-Tag: v4.18.0-rc1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b07c2ba5a20383f0c58870112ecac7c0fe0bf46f;p=thirdparty%2Fxfsprogs-dev.git 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 --- 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: