From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eryu Guan <guaneryu@gmail.com>
Cc: fstests <fstests@vger.kernel.org>
Subject: [PATCH] generic/304: only dedupe the last 64k of the single byte file
Date: Mon, 16 Apr 2018 22:20:35 -0700 [thread overview]
Message-ID: <20180417052035.GC5201@magnolia> (raw)
From: Darrick J. Wong <darrick.wong@oracle.com>
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>
---
tests/generic/304 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/generic/304 b/tests/generic/304
index 6c36a68..ff8ddf8 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"
reply other threads:[~2018-04-17 5:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180417052035.GC5201@magnolia \
--to=darrick.wong@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=guaneryu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox