btrfs: add test for data corruption when using compression
authorFilipe David Borba Manana <fdmanana@gmail.com>
Tue, 18 Feb 2014 07:04:00 +0000 (18:04 +1100)
committerDave Chinner <david@fromorbit.com>
Tue, 18 Feb 2014 07:04:00 +0000 (18:04 +1100)
commitfc3e4e652403ccaba4fc8c7cc13f77eb253959df
treefc5f8746c40e6cc561580659880379931a8106a8
parent8564bb8d8b5b23a3b143b6eb6cb8994e0cb1e439
btrfs: add test for data corruption when using compression

Test for a btrfs data corruption when using compressed
files/extents.  Under certain cases, it was possible for reads to
return random data (content from a previously used page) instead of
zeroes. This also caused partial updates to those regions that were
supposed to be filled with zeroes to save random (and invalid) data
into the file extents.

This is fixed by the commit for the linux kernel titled:

   Btrfs: fix data corruption when reading/updating compressed extents
   (https://patchwork.kernel.org/patch/3610391/)

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/btrfs/037 [new file with mode: 0755]
tests/btrfs/037.out [new file with mode: 0644]
tests/btrfs/group