From patchwork Fri Jun 17 01:48:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 9182349 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 CBC9C6088F for ; Fri, 17 Jun 2016 01:48:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDAB6283A1 for ; Fri, 17 Jun 2016 01:48:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2909283A4; Fri, 17 Jun 2016 01:48:16 +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, 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 58EDF283A2 for ; Fri, 17 Jun 2016 01:48:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932830AbcFQBsP (ORCPT ); Thu, 16 Jun 2016 21:48:15 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:35703 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755124AbcFQBsN (ORCPT ); Thu, 16 Jun 2016 21:48:13 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u5H1mAL2027516 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 17 Jun 2016 01:48:11 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u5H1mARP022889 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 17 Jun 2016 01:48:10 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u5H1m9v1005396; Fri, 17 Jun 2016 01:48:09 GMT Received: from localhost (/10.145.178.207) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 16 Jun 2016 18:48:09 -0700 Subject: [PATCH 20/20] xfs: scrub fs (if still mounted) at the end of the test From: "Darrick J. Wong" To: david@fromorbit.com, darrick.wong@oracle.com Cc: linux-btrfs@vger.kernel.org, fstests@vger.kernel.org, xfs@oss.sgi.com Date: Thu, 16 Jun 2016 18:48:07 -0700 Message-ID: <146612808781.25024.9354886387434772563.stgit@birch.djwong.org> In-Reply-To: <146612796204.25024.18254357523133394284.stgit@birch.djwong.org> References: <146612796204.25024.18254357523133394284.stgit@birch.djwong.org> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Teach _check_xfs_filesystem to scrub mounted filesystems before unmounting and fscking them. This is mostly to test the online scrub tool... Signed-off-by: Darrick J. Wong --- common/config | 1 + common/rc | 7 +++++++ 2 files changed, 8 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe fstests" 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/common/config b/common/config index cacd815..41edb0c 100644 --- a/common/config +++ b/common/config @@ -163,6 +163,7 @@ export XFS_REPAIR_PROG="`set_prog_path xfs_repair`" export XFS_DB_PROG="`set_prog_path xfs_db`" export XFS_GROWFS_PROG=`set_prog_path xfs_growfs` export XFS_IO_PROG="`set_prog_path xfs_io`" +export XFS_SCRUB_PROG="`set_prog_path xfs_scrub`" export XFS_PARALLEL_REPAIR_PROG="`set_prog_path xfs_prepair`" export XFS_PARALLEL_REPAIR64_PROG="`set_prog_path xfs_prepair64`" export __XFSDUMP_PROG="`set_prog_path xfsdump`" diff --git a/common/rc b/common/rc index 847191e..ea5baea 100644 --- a/common/rc +++ b/common/rc @@ -2188,6 +2188,13 @@ _check_xfs_filesystem() if [ "$type" = "xfs" ] then + if [ -x "$XFS_SCRUB_PROG" ]; then + "$XFS_SCRUB_PROG" $scrubflag -vd $device >>$seqres.full + if [ $? -ne 0 ]; then + echo "filesystem on $device failed scrub (see $seqres.full)" + ok=0 + fi + fi # mounted ... mountpoint=`_umount_or_remount_ro $device` fi