From patchwork Thu Mar 1 19:13:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10252229 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 C785B6037D for ; Thu, 1 Mar 2018 19:13:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7F7928524 for ; Thu, 1 Mar 2018 19:13:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACC7F2852C; Thu, 1 Mar 2018 19:13:28 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY 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 3B1B928524 for ; Thu, 1 Mar 2018 19:13:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161155AbeCATN1 (ORCPT ); Thu, 1 Mar 2018 14:13:27 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:52382 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161105AbeCATN0 (ORCPT ); Thu, 1 Mar 2018 14:13:26 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w21JCVXo042515; Thu, 1 Mar 2018 19:13:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=Qzuwshta/WWLqBZy8CVGoMgR6LnAqqEe1CP7t+n4ceg=; b=eTENujX8GCADtve03Ty2mn0PIE48ZZwBZs18YeZ+ZSMUhPT7/fmfcik6Q6f9tLxhMW8V ZH/F/ApALlSht8jUH0TaHHW7672ZuXdxEnZb84brF0sqviLLyT8Is5wvOfgwsD3RpNXr tKEnQuxS1OhVki9fprCdTRCmDaeg9xK5z51VkZWmJz0v6Fz4+08nq+fqsvoomfXJP87Y 7VLP/hd2D1pC/uoG0R6om3nCGTXf/ZUwJZifB2kYQy9t+ZxOexdLBNt6EfqggqXHtHgC rAkbQgtnL6RKHab+Ui/jIuLg49cPGQ/GdiR6kDyOUMwJY9U4uNi5qbjbQRP86bXTe9+9 Aw== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2gep97gc1k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 01 Mar 2018 19:13:22 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w21JDL4w025292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 1 Mar 2018 19:13:21 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w21JDL79029946; Thu, 1 Mar 2018 19:13:21 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 01 Mar 2018 11:13:21 -0800 Subject: [PATCH 04/16] xfs_scrub: don't ask user to run xfs_repair for only warnings From: "Darrick J. Wong" To: sandeen@redhat.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, djwong@kernel.org Date: Thu, 01 Mar 2018 11:13:20 -0800 Message-ID: <151993160036.22223.2742740914776483127.stgit@magnolia> In-Reply-To: <151993157539.22223.6269629008244777191.stgit@magnolia> References: <151993157539.22223.6269629008244777191.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8819 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=763 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803010237 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 From: Darrick J. Wong Don't advise the user to run xfs_repair on a filesystem that triggers warnings but no errors; there's no corruption for it to fix. Signed-off-by: Darrick J. Wong --- scrub/xfs_scrub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 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/xfs_scrub.c b/scrub/xfs_scrub.c index ab26e63..53a105a 100644 --- a/scrub/xfs_scrub.c +++ b/scrub/xfs_scrub.c @@ -514,7 +514,7 @@ report_outcome( fprintf(stderr, _("%s: errors found: %llu; warnings found: %llu\n"), ctx->mntpoint, total_errors, ctx->warnings_found); - if (ctx->need_repair) + if (ctx->need_repair && total_errors > 0) fprintf(stderr, _("%s: Unmount and run xfs_repair.\n"), ctx->mntpoint); }