]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
btrfs: test a case with compressed send stream and a shared extent
authorFilipe Manana <fdmanana@suse.com>
Mon, 28 Nov 2022 12:07:24 +0000 (12:07 +0000)
committerZorro Lang <zlang@kernel.org>
Thu, 8 Dec 2022 12:47:21 +0000 (20:47 +0800)
commit8742da385e0022c17d4ce6efdae329aa5e2084e6
tree4f09b2e6ee828f6a0322466531c511b9274a68e3
parent6f6559a88eb2b3be2270700eac915c7322dc4fb7
btrfs: test a case with compressed send stream and a shared extent

Test that if we have a snapshot with a compressed extent that is partially
shared between two files, one of them has a size that is not sector size
aligned, we create a v2 send stream for the snapshot with compressed data,
and then apply that stream to another filesystem, the operation succeeds
and no data is missing. Also check that the file that had a reference to
the whole extent gets two compressed extents in the new filesystem, with
only one of them being shared (reflinked).

This tests a recent patch that landed in kernel 6.1-rc7:

  a11452a3709e ("btrfs: send: avoid unaligned encoded writes when attempting to clone range")

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/281 [new file with mode: 0755]
tests/btrfs/281.out [new file with mode: 0644]