From patchwork Wed Dec 13 06:03:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10109265 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 178D760327 for ; Wed, 13 Dec 2017 06:18:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D00428A74 for ; Wed, 13 Dec 2017 06:18:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 016E628CE2; Wed, 13 Dec 2017 06:18:37 +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 65E1728A74 for ; Wed, 13 Dec 2017 06:18:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750795AbdLMGSg (ORCPT ); Wed, 13 Dec 2017 01:18:36 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:41362 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750739AbdLMGSf (ORCPT ); Wed, 13 Dec 2017 01:18:35 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.21/8.16.0.21) with SMTP id vBD6INHc172744; Wed, 13 Dec 2017 06:18:32 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=lLC0M4tEDbpMuaj6D6qLgeUnguzlKGK7VVNQmNml7YM=; b=GkI7xP0SObrccbSdxniBodlPRC1DUNfUeDZjj1zhGtWvNTCsmW2hZQTrP7ng2ecXzUak P6/9S431oQszv8nueg9+/BuQosrk4/tRoXwG2BazelWflHz4V1s1mDjqWkla1tQx4S74 01FpZtMtBoS0xX9cFAVrTPBYQrzwq1hpz4uhB2lTnB/zO0hNN53AIul8AWrHO+Hdj43o tbLj2eK+FcLyyDwWWMurmz9daJ+wiATv4S75UF5EAUeO7ZPYAqHwILxQo01WjrcfX0yg bsSJyO4glFJRrMDTFAwHfqS4GjD3RMlM9GHNypfLKvQQfS5NdJPnZbRW1Xh77Ho15CW/ mg== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2etxdj08pq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Dec 2017 06:18:31 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id vBD63hb8029635 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Dec 2017 06:03:43 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id vBD63ht9018991; Wed, 13 Dec 2017 06:03:43 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 12 Dec 2017 22:03:42 -0800 Subject: [PATCH 4/8] xfs: fix tests to handle removal of no-alloc create nonfeature From: "Darrick J. Wong" To: eguan@redhat.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 12 Dec 2017 22:03:42 -0800 Message-ID: <151314502196.18893.14496524309954254435.stgit@magnolia> In-Reply-To: <151314499003.18893.8687182548758898133.stgit@magnolia> References: <151314499003.18893.8687182548758898133.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8743 signatures=668646 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=523 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1712130090 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 We're removing from XFS the ability to perform no-allocation file creation. This was added years ago because someone at SGI demanded that we still be able to create (empty?) files with zero free blocks remaining so long as there were free inodes and space in existing directory blocks. This came at an unacceptable risk of ENOSPC'ing midway through a transaction and shutting down the fs, so we're removing it for the create case. However, some tests fail as a result, so fix them to be more flexible about not failing when a dir/file creation fails due to ENOSPC. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner --- tests/xfs/013 | 6 ++++-- tests/xfs/014 | 3 +++ tests/xfs/104 | 2 +- tests/xfs/109 | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) -- 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/013 b/tests/xfs/013 index 80298ca..394b9bc 100755 --- a/tests/xfs/013 +++ b/tests/xfs/013 @@ -145,8 +145,10 @@ $FSSTRESS_PROG -d $SCRATCH_MNT/fsstress -n 9999999 -p 2 -S t \ for i in $(seq 1 $LOOPS) do # hard link the content of the current directory to the next - cp -Rl $SCRATCH_MNT/dir$i $SCRATCH_MNT/dir$((i+1)) 2>&1 | \ - filter_enospc + while ! test -d $SCRATCH_MNT/dir$((i+1)); do + cp -Rl $SCRATCH_MNT/dir$i $SCRATCH_MNT/dir$((i+1)) 2>&1 | \ + filter_enospc + done # do a random replacement of files in the new directory _rand_replace $SCRATCH_MNT/dir$((i+1)) $COUNT diff --git a/tests/xfs/014 b/tests/xfs/014 index 875ab40..08cd001 100755 --- a/tests/xfs/014 +++ b/tests/xfs/014 @@ -112,6 +112,9 @@ _test_enospc() # consume 1/2 of the current preallocation across the set of 4 writers write_size=$((TOTAL_PREALLOC / 2 / 4)) for i in $(seq 0 3); do + touch $dir/file.$i + done + for i in $(seq 0 3); do $XFS_IO_PROG -f -c "pwrite 0 $write_size" $dir/file.$i \ >> $seqres.full & done diff --git a/tests/xfs/104 b/tests/xfs/104 index 785027e..c3b5977 100755 --- a/tests/xfs/104 +++ b/tests/xfs/104 @@ -65,7 +65,7 @@ _stress_scratch() # -w ensures that the only ops are ones which cause write I/O FSSTRESS_ARGS=`_scale_fsstress_args -d $SCRATCH_MNT -w -p $procs \ -n $nops $FSSTRESS_AVOID` - $FSSTRESS_PROG $FSSTRESS_ARGS >> $seqres.full & + $FSSTRESS_PROG $FSSTRESS_ARGS >> $seqres.full 2>&1 & } # real QA test starts here diff --git a/tests/xfs/109 b/tests/xfs/109 index e0fdec3..2625f15 100755 --- a/tests/xfs/109 +++ b/tests/xfs/109 @@ -79,7 +79,7 @@ allocate() while [ $j -lt 100 ]; do $XFS_IO_PROG -f -c 'pwrite -b 64k 0 16m' $file \ >/dev/null 2>&1 - rm $file + test -e $file && rm $file let j=$j+1 done } &