From 72b28077a20a6a1f14494602466c219241f45d89 Mon Sep 17 00:00:00 2001 From: Liu Bo Date: Fri, 5 Jan 2018 12:51:12 -0700 Subject: 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 Reviewed-by: Josef Bacik [ minor string adjustments ] Signed-off-by: David Sterba --- fs/btrfs/tests/btrfs-tests.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/btrfs/tests/btrfs-tests.h') 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); -- cgit v1.2.3