btrfs: regression test for btrfs extent merge

The following kernel commit introduced the bug:
51f395ad btrfs: Use right extent length when inserting overlap extent map.

When btrfs commit race with btrfs_get_extent(), merge_extent_mapping()
may build up a new extent which length overflows and cause extent map
insert fail, causing the caller get a -EEXIST error.

This regression is fixed by the following patches:
btrfs: Fix and enhance merge_extent_mapping() to insert best fitted extent map
btrfs: Fix the wrong condition judgment about subset extent map

Cc: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Tested-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Qu Wenruo
2014-11-10 13:04:00 +11:00
committed by Dave Chinner
parent 8c7c07e79b
commit 027bcfa64e
3 changed files with 129 additions and 0 deletions
+1
View File
@@ -81,3 +81,4 @@
076 auto quick
077 auto quick
078 auto
079 auto