From patchwork Thu Jul 21 23:46:29 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: 9242679 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 43C3360574 for ; Thu, 21 Jul 2016 23:46:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 368B3268AE for ; Thu, 21 Jul 2016 23:46:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B56027BF7; Thu, 21 Jul 2016 23:46:44 +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=unavailable 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 CE7BB268AE for ; Thu, 21 Jul 2016 23:46:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752488AbcGUXqk (ORCPT ); Thu, 21 Jul 2016 19:46:40 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:29135 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752477AbcGUXqj (ORCPT ); Thu, 21 Jul 2016 19:46:39 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u6LNkYv6006697 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 21 Jul 2016 23:46:34 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u6LNkYS9019524 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 21 Jul 2016 23:46:34 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u6LNkVVp026243; Thu, 21 Jul 2016 23:46:33 GMT Received: from localhost (/10.145.178.207) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 21 Jul 2016 16:46:31 -0700 Subject: [PATCH 02/17] xfs: use rmapbt-checking helper From: "Darrick J. Wong" To: david@fromorbit.com, eguan@redhat.com, darrick.wong@oracle.com Cc: linux-btrfs@vger.kernel.org, fstests@vger.kernel.org, xfs@oss.sgi.com Date: Thu, 21 Jul 2016 16:46:29 -0700 Message-ID: <146914478956.11762.1523179302392973799.stgit@birch.djwong.org> In-Reply-To: <146914477514.11762.3144320628851923350.stgit@birch.djwong.org> References: <146914477514.11762.3144320628851923350.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: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Don't open-code _notrun checks for the rmapbt, just use the helper. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- tests/xfs/310 | 4 +--- tests/xfs/314 | 4 +--- tests/xfs/317 | 4 +--- tests/xfs/322 | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" 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/310 b/tests/xfs/310 index 36b683c..bfdec39 100755 --- a/tests/xfs/310 +++ b/tests/xfs/310 @@ -47,6 +47,7 @@ _cleanup() _supported_os Linux _supported_fs xfs _require_scratch +_require_xfs_scratch_rmapbt _require_xfs_io_command "falloc" rm -f $seqres.full @@ -56,9 +57,6 @@ echo "Figure out block size" _scratch_mkfs >/dev/null 2>&1 _scratch_mount >> $seqres.full -is_rmap=$(xfs_info $SCRATCH_MNT | grep -c "rmapbt=1") -test $is_rmap -gt 0 || _notrun "rmap not supported on scratch fs" - testdir=$SCRATCH_MNT/test-$seq blksz="$(stat -f $SCRATCH_MNT -c '%S')" diff --git a/tests/xfs/314 b/tests/xfs/314 index 6b867b8..ec16c6f 100755 --- a/tests/xfs/314 +++ b/tests/xfs/314 @@ -48,6 +48,7 @@ _supported_os Linux _supported_fs xfs _require_cp_reflink _require_scratch_reflink +_require_xfs_scratch_rmapbt _require_error_injection _require_xfs_io_error_injection "rmap_finish_one" @@ -60,9 +61,6 @@ echo "Format filesystem" _scratch_mkfs >/dev/null 2>&1 _scratch_mount >> $seqres.full -is_rmap=$(xfs_info $SCRATCH_MNT | grep -c "rmapbt=1") -test $is_rmap -gt 0 || _notrun "rmap not supported on scratch fs" - echo "Create files" _pwrite_byte 0x66 0 $sz $SCRATCH_MNT/file1 >> $seqres.full _cp_reflink $SCRATCH_MNT/file1 $SCRATCH_MNT/file2 diff --git a/tests/xfs/317 b/tests/xfs/317 index ac9f3ae..507c2a9 100755 --- a/tests/xfs/317 +++ b/tests/xfs/317 @@ -45,6 +45,7 @@ _cleanup() _supported_os Linux _supported_fs xfs _require_scratch +_require_xfs_scratch_rmapbt _require_error_injection _require_xfs_io_error_injection "rmap_finish_one" @@ -57,9 +58,6 @@ echo "Format filesystem" _scratch_mkfs >/dev/null 2>&1 _scratch_mount >> $seqres.full -is_rmap=$(xfs_info $SCRATCH_MNT | grep -c "rmapbt=1") -test $is_rmap -gt 0 || _notrun "rmap not supported on scratch fs" - echo "Create files" touch $SCRATCH_MNT/file1 _pwrite_byte 0x67 0 $sz $SCRATCH_MNT/file0 >> $seqres.full diff --git a/tests/xfs/322 b/tests/xfs/322 index 0dddb1f..ef402c8 100755 --- a/tests/xfs/322 +++ b/tests/xfs/322 @@ -48,6 +48,7 @@ _supported_os Linux _supported_fs xfs _require_cp_reflink _require_scratch_reflink +_require_xfs_scratch_rmapbt _require_xfs_io_error_injection "rmap_finish_one" rm -f $seqres.full @@ -59,9 +60,6 @@ echo "Format filesystem" _scratch_mkfs >/dev/null 2>&1 _scratch_mount >> $seqres.full -is_rmap=$(xfs_info $SCRATCH_MNT | grep -c "rmapbt=1") -test $is_rmap -gt 0 || _notrun "rmap not supported on scratch fs" - echo "Create files" _pwrite_byte 0x66 0 $sz $SCRATCH_MNT/file1 >> $seqres.full $XFS_IO_PROG -f -c "truncate $sz" $SCRATCH_MNT/file3 >> $seqres.full