aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-04-16 22:20:35 -0700
committerEryu Guan <guaneryu@gmail.com>2018-04-17 13:26:59 +0800
commita738e04549ab70434dea6cb069c9a928596c4fdf (patch)
tree5376a4aab50f6f9ee9211ae60eb182a24586bf72
parent9302f745791e4379f9657b686e90e1389b82a64b (diff)
downloadxfstests-dev-a738e04549ab70434dea6cb069c9a928596c4fdf.tar.gz
generic/304: only dedupe the last 64k of the single byte file
Commit 1ddae54555b62 ("common/rc: add missing 'local' keywords") exposed a long-hidden bug in generic/304 -- previously we'd set len to 8EiB, but _pwrite_byte reset it to 1 because the helper clumsily polluted the caller's variable namespace. Now that's fixed, but we send an 8EiB dedupe request to the kernel, which on XFS locks up the kernel while doing this. The point of this test is to demonstrate that one cannot dedupe the last byte of a (2^63-1) byte file (that's the way the interface has behaved historically), so start at 64k below that instead of offset zero. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
-rwxr-xr-xtests/generic/3042
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/generic/304 b/tests/generic/304
index 6c36a68b1a..ff8ddf8299 100755
--- a/tests/generic/304
+++ b/tests/generic/304
@@ -63,7 +63,7 @@ _pwrite_byte 0x61 $bigoff 1 $testdir/file3 >> $seqres.full
_pwrite_byte 0x61 1048575 1 $testdir/file2 >> $seqres.full
echo "Dedupe large single byte file"
-_dedupe_range $testdir/file1 0 $testdir/file3 0 $len \
+_dedupe_range $testdir/file1 $bigoff_64k $testdir/file3 $bigoff_64k 65536 \
2>&1 >> $seqres.full | _filter_dedupe_error
echo "Dedupe large empty file"