btrfs: test cloning of zero length ranges

Test cloning a file range with a length of zero into a destination offset
greater than zero.

This made btrfs create an extent state record with a start offset greater than
the end offset, resulting in chaos such as an infinite loop when evicting an
inode.

This issue was fixed by the following linux kernel patch:

   Btrfs: fix inode eviction infinite loop after cloning into it

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Filipe Manana
2015-04-01 11:39:24 +11:00
committed by Dave Chinner
parent b2aa857e0a
commit 9edaf22811
3 changed files with 80 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
QA output created by 086
bar file size after clone operation: 0