btrfs: check that cloning an inline extent does not lead to data loss
authorFilipe Manana <fdmanana@suse.com>
Mon, 6 Apr 2020 10:51:34 +0000 (11:51 +0100)
committerEryu Guan <guaneryu@gmail.com>
Sun, 19 Apr 2020 15:32:09 +0000 (23:32 +0800)
commitc684b203d1bdcc41fa624efa68f736ffe29b151d
tree23faa3bce4362d86e67f7ece478cd10ac83100d3
parent200e7d53102dc7ea1650e13b5a78d968155a89d2
btrfs: check that cloning an inline extent does not lead to data loss

We have a bug in the current kernel merge window (for 5.7) that results
in data loss when cloning an inline extent into a new file (or an empty
file. This change adds a test for such case into the existing test case
btrfs/205, because it's the test case that tests all the supported
scenarios for cloning inline extents in btrfs.

Linux kernel commit 4fdb688c7071 ("btrfs: fix lost i_size update
after cloning inline extent") fixes the regression.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/btrfs/205
tests/btrfs/205.out