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: 9469895 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 DA96460760 for ; Sun, 11 Dec 2016 21:53:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB65828210 for ; Sun, 11 Dec 2016 21:53:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEF2B2824F; Sun, 11 Dec 2016 21:53:28 +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=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 70AE828210 for ; Sun, 11 Dec 2016 21:53:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753995AbcLKVx2 (ORCPT ); Sun, 11 Dec 2016 16:53:28 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:33256 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753865AbcLKVx1 (ORCPT ); Sun, 11 Dec 2016 16:53:27 -0500 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id uBBLrO7w029961 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 11 Dec 2016 21:53:25 GMT 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 Subject: [PATCH 6/7] reflink: don't test disjoint block sharing sets From: "Darrick J. Wong" To: eguan@redhat.com, darrick.wong@oracle.com Cc: ocfs2-devel@oss.oracle.com, fstests@vger.kernel.org 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 X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org 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(+) -- 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/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