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: 9242677 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 067EE60574 for ; Thu, 21 Jul 2016 23:46:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBBE6223A4 for ; Thu, 21 Jul 2016 23:46:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E091726E81; Thu, 21 Jul 2016 23:46:41 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from oss.sgi.com (oss.sgi.com [192.48.182.195]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7C053223A4 for ; Thu, 21 Jul 2016 23:46:41 +0000 (UTC) Received: from oss.sgi.com (localhost [IPv6:::1]) by oss.sgi.com (Postfix) with ESMTP id C1A147CA4; Thu, 21 Jul 2016 18:46:40 -0500 (CDT) X-Original-To: xfs@oss.sgi.com Delivered-To: xfs@oss.sgi.com Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (Postfix) with ESMTP id 2BFD37CA4 for ; Thu, 21 Jul 2016 18:46:38 -0500 (CDT) Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by relay3.corp.sgi.com (Postfix) with ESMTP id 8A43AAC004 for ; Thu, 21 Jul 2016 16:46:37 -0700 (PDT) X-ASG-Debug-ID: 1469144795-04cb6c0368586d0001-NocioJ Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) by cuda.sgi.com with ESMTP id iMFObAgv6os4nctY (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 21 Jul 2016 16:46:35 -0700 (PDT) X-Barracuda-Envelope-From: darrick.wong@oracle.com X-Barracuda-Effective-Source-IP: aserp1040.oracle.com[141.146.126.69] X-Barracuda-Apparent-Source-IP: 141.146.126.69 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" X-ASG-Orig-Subj: [PATCH 02/17] xfs: use rmapbt-checking helper To: david@fromorbit.com, eguan@redhat.com, darrick.wong@oracle.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] X-Barracuda-Connect: aserp1040.oracle.com[141.146.126.69] X-Barracuda-Start-Time: 1469144795 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://192.48.176.15:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 3026 X-Virus-Scanned: by bsmtpd at sgi.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.7 tests=BSF_SC0_MISMATCH_TO, UNPARSEABLE_RELAY X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.31434 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header 0.00 UNPARSEABLE_RELAY Informational: message has unparseable relay lines Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org, xfs@oss.sgi.com X-BeenThere: xfs@oss.sgi.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com 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(-) 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