generic: concurrent non-overlapping direct I/O on the same extents

There have been a couple of logic bugs in `btrfs_get_extent()` which
could lead to spurious -EEXIST errors from read or write. This test
exercises those conditions by having two threads race to add an
extent to the extent map.

This is fixed by Linux commit 8dff9c853410 ("Btrfs: deal with
duplciates during extent_map insertion in btrfs_get_extent") and the
patch "Btrfs: deal with existing encompassing extent map in
btrfs_get_extent()"
(http://marc.info/?l=linux-btrfs&m=147873402311143&w=2).

Although the bug is Btrfs-specific, nothing about the test is.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Omar Sandoval
2016-11-16 16:29:34 -08:00
committed by Eryu Guan
parent 775e2d0c03
commit 21616145d2
6 changed files with 179 additions and 1 deletions
+1
View File
@@ -44,6 +44,7 @@
/src/bulkstat_unlink_test_modified
/src/dbtest
/src/devzero
/src/dio-interleaved
/src/dirperf
/src/dirstress
/src/dmiperf