btrfs: cloning of compressed inline extent after truncation
authorFilipe Manana <fdmanana@suse.com>
Mon, 2 Nov 2015 00:00:22 +0000 (11:00 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 2 Nov 2015 00:00:22 +0000 (11:00 +1100)
commit7ff4bb25cea7a294113f52369951db6ae52f5f9d
treec6b77ead46b5bba480550ea40ff154d83fd0ec4e
parenta71e9bbd51cd1ac9725c9d6f58350a1d2dd37652
btrfs: cloning of compressed inline extent after truncation

Test that truncating a file that consists of a compressed and inlined extent
to a smaller size and then cloning it into another file is not possible and
does not result in leaking stale data (data past the truncation offset) nor
losing data in the clone operation's destination file.

This btrfs issue is fixed by the linux kernel patch titled:

  "Btrfs: fix truncation of compressed and inlined extents"

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/btrfs/113 [new file with mode: 0755]
tests/btrfs/113.out [new file with mode: 0644]
tests/btrfs/group