From patchwork Sun Dec 11 21:53:22 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: 9469905 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 0BDB360760 for ; Sun, 11 Dec 2016 21:54:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFD9F28210 for ; Sun, 11 Dec 2016 21:54:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E22792835E; Sun, 11 Dec 2016 21:54:53 +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 userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7410128210 for ; Sun, 11 Dec 2016 21:54:53 +0000 (UTC) Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id uBBLs9dw030419 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 11 Dec 2016 21:54:10 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id uBBLs8HO008395 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 Dec 2016 21:54:09 GMT Received: from localhost ([127.0.0.1] helo=lb-oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1cGC4O-00027L-Ni; Sun, 11 Dec 2016 13:54:08 -0800 Received: from aserv0022.oracle.com ([141.146.126.234]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1cGC3g-0001rg-U5 for ocfs2-devel@oss.oracle.com; Sun, 11 Dec 2016 13:53:24 -0800 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id uBBLrOkw002970 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 11 Dec 2016 21:53:24 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 uBBLrNIs000405; Sun, 11 Dec 2016 21:53:24 GMT Received: from localhost (/24.21.211.40) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 11 Dec 2016 13:53:23 -0800 From: "Darrick J. Wong" To: eguan@redhat.com, darrick.wong@oracle.com Date: Sun, 11 Dec 2016 13:53:22 -0800 Message-ID: <148149320283.31093.5997149744213850055.stgit@birch.djwong.org> In-Reply-To: <148149316504.31093.16129068344227450710.stgit@birch.djwong.org> References: <148149316504.31093.16129068344227450710.stgit@birch.djwong.org> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Cc: fstests@vger.kernel.org, ocfs2-devel@oss.oracle.com Subject: [Ocfs2-devel] [PATCH 6/7] reflink: don't test disjoint block sharing sets X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Source-IP: userv0022.oracle.com [156.151.31.74] X-Virus-Scanned: ClamAV using ClamSMTP Unlike xfs/btrfs which store refcounting information as part of the space metadata, ocfs2 implements block sharing (reflink) by creating refcount btrees that are shared between subsets of files. Effectively, this means that a ocfs2 can have multiple disjoint sets of files that share blocks, which also means that blocks cannot be reflinked between two disjoint refcounted-file-sets. generic/119 tests the ability to do this, so we cannot run it for ocfs2. Create a _require helper to check for this. Signed-off-by: Darrick J. Wong --- common/reflink | 9 +++++++++ tests/generic/119 | 1 + 2 files changed, 10 insertions(+) diff --git a/common/reflink b/common/reflink index d048045..55d82ac 100644 --- a/common/reflink +++ b/common/reflink @@ -28,6 +28,15 @@ _require_cp_reflink() _notrun "This test requires a cp with --reflink support." } +# Can we reflink between arbitrary file sets? +# i.e. if we reflink a->b and c->d, can we later share +# blocks between b & c? +_require_arbitrary_fileset_reflink() +{ + test "$FSTYP" = "ocfs2" && \ + _notrun "reflink between arbitrary file groups not supported in $FSTYP" +} + # Given 2 files, verify that they have the same mapping but different # inodes - i.e. an undisturbed reflink # Silent if so, make noise if not diff --git a/tests/generic/119 b/tests/generic/119 index e6a6f59..b28e044 100755 --- a/tests/generic/119 +++ b/tests/generic/119 @@ -47,6 +47,7 @@ _cleanup() # real QA test starts here _supported_os Linux _require_test_reflink +_require_arbitrary_fileset_reflink rm -f $seqres.full