From patchwork Thu Feb 1 21:46:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 10196059 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 81DA160362 for ; Thu, 1 Feb 2018 21:51:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 79066286CA for ; Thu, 1 Feb 2018 21:51:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6BBBF27165; Thu, 1 Feb 2018 21:51:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B79928B37 for ; Thu, 1 Feb 2018 21:50:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751931AbeBAVqV (ORCPT ); Thu, 1 Feb 2018 16:46:21 -0500 Received: from sandeen.net ([63.231.237.45]:60092 "EHLO sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751730AbeBAVqV (ORCPT ); Thu, 1 Feb 2018 16:46:21 -0500 Received: from [10.0.0.4] (liberator [10.0.0.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTPSA id 1F4C0F8AED; Thu, 1 Feb 2018 15:45:59 -0600 (CST) Subject: [PATCH 31/29 v2] xfs_scrub: handle scrub-only kernels more helpfully From: Eric Sandeen To: "Darrick J. Wong" , sandeen@redhat.com Cc: linux-xfs@vger.kernel.org References: <151736799098.32164.15446216987522359103.stgit@magnolia> <20180131173016.GD4849@magnolia> <313224b9-67b0-cd94-fca5-a862761b2b02@sandeen.net> Message-ID: <8b77b774-5f60-2236-ab23-b591417e79a9@sandeen.net> Date: Thu, 1 Feb 2018 15:46:20 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <313224b9-67b0-cd94-fca5-a862761b2b02@sandeen.net> Content-Language: en-US Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If xfs_scrub is run today against a 4.15 kernel, it fails with EXPERIMENTAL xfs_scrub program in use! Use at your own risk! Error: /home: Kernel metadata optimization facility is required. Info: /home: Scrub aborted after phase 1. /home: 2 errors found. Be a bit kinder to the user and suggest a path forward. By the time we fail for missing preen or repair functionality, we do know that scrub is available, so suggest it. Further, rather than stating what is required, state what was not found ... we're failing, so state what was missing, vs. what is required - seems a bit more definitive. Signed-off-by: Eric Sandeen Reviewed-by: Bill O'Donnell Reviewed-by: Darrick J. Wong --- V2: change verbiage to make it more better and not not not confusing. -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/scrub/phase1.c b/scrub/phase1.c index 547767b..9128429 100644 --- a/scrub/phase1.c +++ b/scrub/phase1.c @@ -175,7 +175,7 @@ _("Does not appear to be an XFS filesystem!")); !xfs_can_scrub_attr(ctx) || !xfs_can_scrub_symlink(ctx) || !xfs_can_scrub_parent(ctx)) { str_error(ctx, ctx->mntpoint, -_("Kernel metadata scrubbing facility is required.")); +_("Kernel metadata scrubbing facility is not available.")); return false; } @@ -183,10 +183,10 @@ _("Kernel metadata scrubbing facility is required.")); if (ctx->mode != SCRUB_MODE_DRY_RUN && !xfs_can_repair(ctx)) { if (ctx->mode == SCRUB_MODE_PREEN) str_error(ctx, ctx->mntpoint, -_("Kernel metadata optimization facility is required.")); +_("Kernel metadata optimization facility is not available. Use -n to scrub.")); else str_error(ctx, ctx->mntpoint, -_("Kernel metadata repair facility is required.")); +_("Kernel metadata repair facility is not available. Use -n to scrub.")); return false; }