diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2018-01-05 22:51:12 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-01-22 18:08:22 +0300 |
commit | 72b28077a20a6a1f14494602466c219241f45d89 (patch) | |
tree | 9cf7c34853eeb564ff4f906a9d1d4a48ef562975 /fs/btrfs/tests/btrfs-tests.c | |
parent | c04e61b5e41b0e8ace4aa4b67685fbe68ac37a46 (diff) | |
download | linux-72b28077a20a6a1f14494602466c219241f45d89.tar.xz |
Btrfs: add extent map selftests
We've observed that btrfs_get_extent() and merge_extent_mapping() could
return -EEXIST in several cases, and they are caused by some racy
condition, e.g dio read vs dio write, which makes the problem very tricky
to reproduce.
This adds extent map selftests in order to simulate those racy situations.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
[ minor string adjustments ]
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tests/btrfs-tests.c')
-rw-r--r-- | fs/btrfs/tests/btrfs-tests.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c index d3f25376a0f8..9786d8cd0aa6 100644 --- a/fs/btrfs/tests/btrfs-tests.c +++ b/fs/btrfs/tests/btrfs-tests.c @@ -277,6 +277,9 @@ int btrfs_run_sanity_tests(void) goto out; } } + ret = btrfs_test_extent_map(); + if (ret) + goto out; out: btrfs_destroy_test_fs(); return ret; |