]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
reflink: don't test disjoint block sharing sets
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 11 Dec 2016 21:53:22 +0000 (13:53 -0800)
committerEryu Guan <eguan@redhat.com>
Tue, 13 Dec 2016 06:26:18 +0000 (14:26 +0800)
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>
common/reflink
tests/generic/119

index 9d51729b1e644d32004a5fec2c7e05ffc9450932..64ee04f66972a238fc619821bfcddcc402391e33 100644 (file)
@@ -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
index e6a6f59628f7fbc1014d05b63da178f7ca3b6dce..b28e044aafcaeaed62f88774861097539f199f03 100755 (executable)
@@ -47,6 +47,7 @@ _cleanup()
 # real QA test starts here
 _supported_os Linux
 _require_test_reflink
+_require_arbitrary_fileset_reflink
 
 rm -f $seqres.full