From patchwork Tue May 1 15:40:03 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: 10374115 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 80F2A60234 for ; Tue, 1 May 2018 15:40:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F47827F86 for ; Tue, 1 May 2018 15:40:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 625F828716; Tue, 1 May 2018 15:40:10 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, 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 F052F27F86 for ; Tue, 1 May 2018 15:40:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753505AbeEAPkJ (ORCPT ); Tue, 1 May 2018 11:40:09 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:46606 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753851AbeEAPkI (ORCPT ); Tue, 1 May 2018 11:40:08 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w41FZfPn109130; Tue, 1 May 2018 15:40:07 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=e+GpPzAGsQ6C62SaAntYC+OD+536yQ4L2C+Kt9QdSjs=; b=i9jM/5JfzEEIXOaqcfHPWgj0GHDQUpivts10LmdAT1HwH3+vLifnSNlJNHR0bAAjUo1W dKk4eNVteP+XEdjkkmlc7VitoqVC+RMOl9CvvXqCHoDmDQ5p0C2CynlInkkjmbnlFtlF oqvX4nvV4zZSRJ9zazXVWkI5aNbixtwGA2lTF5uh45DDBZSQyINPlRa3rl2s5Ne2zoTo fI4/7+9Mh1cT2onVRUpJZjCiQb7xvfsDnd43nWC4f/0SWZ7N+Yn35E6tX8fu4wawAmsK SUk4b2TgEnoFeMIEwORyQ5h1zvg6HQRNpihyAlyHOQYzB/2Jzi2G5fy8zq5iiCAV2fCN nA== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2hmgxfr6gs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 01 May 2018 15:40:07 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w41Fe6TT024199 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 1 May 2018 15:40:06 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w41Fe5hw006729; Tue, 1 May 2018 15:40:06 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 01 May 2018 08:40:05 -0700 Subject: [PATCH 7/9] xfs/422: add fsstress to the freeze-and-rmap-repair race test From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 01 May 2018 08:40:03 -0700 Message-ID: <152518920390.23023.633707441886698447.stgit@magnolia> In-Reply-To: <152518916007.23023.4793255395982876953.stgit@magnolia> References: <152518916007.23023.4793255395982876953.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8880 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805010154 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Add fsstress to the pile of things that we race with rmap repair to ensure that the rmap repair isolates the filesystem correctly while it is doing its repairs. Signed-off-by: Darrick J. Wong --- tests/xfs/422 | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) -- 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/tests/xfs/422 b/tests/xfs/422 index a8fa5d5a..b2db713c 100755 --- a/tests/xfs/422 +++ b/tests/xfs/422 @@ -51,6 +51,8 @@ _supported_fs xfs _require_xfs_scratch_rmapbt _require_xfs_io_command "scrub" _require_xfs_io_error_injection "force_repair" +_require_command "$KILLALL_PROG" killall +_require_command "$FSSTRESS_PROG" fsstress echo "Format and populate" _scratch_mkfs > "$seqres.full" 2>&1 @@ -89,18 +91,33 @@ repair_loop() { $XFS_IO_PROG -x -c 'repair rmapbt 0' -c 'repair rmapbt 1' $SCRATCH_MNT 2>&1 | filter_output done } +stress_loop() { + end="$1" + + FSSTRESS_ARGS=$(_scale_fsstress_args -p 4 -d $SCRATCH_MNT -n 2000 $FSSTRESS_AVOID) + while [ "$(date +%s)" -lt $end ]; do + $FSSTRESS_PROG $FSSTRESS_ARGS >> $seqres.full + done +} $XFS_IO_PROG -x -c 'inject force_repair' $SCRATCH_MNT start=$(date +%s) end=$((start + (30 * TIME_FACTOR) )) echo "Loop started at $(date --date="@${start}"), ending at $(date --date="@${end}")" >> $seqres.full +stress_loop $end & freeze_loop $end & repair_loop $end & -while [ "$(date +%s)" -lt $end ]; do +# Wait until 2 seconds after the loops should have finished... +while [ "$(date +%s)" -lt $((end + 2)) ]; do sleep 1 done + +# ...and clean up after the loops in case they didn't do it themselves. +$KILLALL_PROG -TERM xfs_io fsstress >> $seqres.full 2>&1 +$XFS_IO_PROG -x -c 'thaw' $SCRATCH_MNT >> $seqres.full 2>&1 + echo "Loop finished at $(date)" >> $seqres.full echo "Test done"