generic/517: make test work on filesystems with block size greater than 4Kb
authorFilipe Manana <fdmanana@suse.com>
Tue, 13 Aug 2019 16:22:55 +0000 (17:22 +0100)
committerEryu Guan <guaneryu@gmail.com>
Sun, 18 Aug 2019 14:39:01 +0000 (22:39 +0800)
commit0d39941c0445cd4fc9d5316ce9f966318957367e
tree63f9237c1a8292e8b7bb1f3fa9087479fd2cd0b9
parent8adf5e71df15c92943b581211d3886dfae437a25
generic/517: make test work on filesystems with block size greater than 4Kb

The test currently fails on filesystems with a block size greater
than 4Kb, as dedupe operations fail with -EINVAL because the file
offsets used are not multiples of such block sizes (but they are
multiples of 4Kb, 2Kb and 1Kb).

So update the test to use offsets that are multiples of 64Kb, since
that allows the test to work on filesystems with any block size
between 4Kb and 64Kb (8Kb, 16Kb, 32Kb). Verified it works as
expected on kernels that have the fixes for the issue tested by this
test case (listed in the changelog of commit
91540ef980110f78161893f98d946e2afa0c1f4a), and on systems without
those fixes (a 4.18 kernel), it fails as it is supposed to.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/517
tests/generic/517.out