aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2016-12-11 13:53:22 -0800
committerEryu Guan <eguan@redhat.com>2016-12-13 14:26:18 +0800
commitf613638308c9a0a91d83f13dab7d79549d1cacbd (patch)
treee3c7ca84efba420099aa93517abf8ecd5cb4667d
parent2257d91fe4a5b018c02cb06e0a4b62ae094e494f (diff)
downloadxfstests-dev-f613638308c9a0a91d83f13dab7d79549d1cacbd.tar.gz
reflink: don't test disjoint block sharing sets
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 <darrick.wong@oracle.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
-rw-r--r--common/reflink9
-rwxr-xr-xtests/generic/1191
2 files changed, 10 insertions, 0 deletions
diff --git a/common/reflink b/common/reflink
index 9d51729b1e..64ee04f669 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 e6a6f59628..b28e044aaf 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