summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tests/btrfs-tests.h
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2018-01-05 12:51:12 -0700
committerDavid Sterba <dsterba@suse.com>2018-01-22 16:08:22 +0100
commit72b28077a20a6a1f14494602466c219241f45d89 (patch)
tree9cf7c34853eeb564ff4f906a9d1d4a48ef562975 /fs/btrfs/tests/btrfs-tests.h
parentc04e61b5e41b0e8ace4aa4b67685fbe68ac37a46 (diff)
downloadlinux-72b28077a20a6a1f14494602466c219241f45d89.tar.gz
linux-72b28077a20a6a1f14494602466c219241f45d89.tar.bz2
linux-72b28077a20a6a1f14494602466c219241f45d89.zip
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.h')
-rw-r--r--fs/btrfs/tests/btrfs-tests.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/tests/btrfs-tests.h b/fs/btrfs/tests/btrfs-tests.h
index 266f1e3d1784..bc0615bac3cc 100644
--- a/fs/btrfs/tests/btrfs-tests.h
+++ b/fs/btrfs/tests/btrfs-tests.h
@@ -33,6 +33,7 @@ int btrfs_test_extent_io(u32 sectorsize, u32 nodesize);
int btrfs_test_inodes(u32 sectorsize, u32 nodesize);
int btrfs_test_qgroups(u32 sectorsize, u32 nodesize);
int btrfs_test_free_space_tree(u32 sectorsize, u32 nodesize);
+int btrfs_test_extent_map(void);
struct inode *btrfs_new_test_inode(void);
struct btrfs_fs_info *btrfs_alloc_dummy_fs_info(u32 nodesize, u32 sectorsize);
void btrfs_free_dummy_fs_info(struct btrfs_fs_info *fs_info);