Loading fs/btrfs/tests/extent-map-tests.c +19 −4 Original line number Diff line number Diff line Loading @@ -56,8 +56,10 @@ static int test_case_1(struct btrfs_fs_info *fs_info, int ret; em = alloc_extent_map(); if (!em) if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); return -ENOMEM; } /* Add [0, 16K) */ em->start = 0; Loading @@ -74,6 +76,7 @@ static int test_case_1(struct btrfs_fs_info *fs_info, /* Add [16K, 20K) following [0, 16K) */ em = alloc_extent_map(); if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); ret = -ENOMEM; goto out; } Loading @@ -91,6 +94,7 @@ static int test_case_1(struct btrfs_fs_info *fs_info, em = alloc_extent_map(); if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); ret = -ENOMEM; goto out; } Loading Loading @@ -134,8 +138,10 @@ static int test_case_2(struct btrfs_fs_info *fs_info, int ret; em = alloc_extent_map(); if (!em) if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); return -ENOMEM; } /* Add [0, 1K) */ em->start = 0; Loading @@ -152,6 +158,7 @@ static int test_case_2(struct btrfs_fs_info *fs_info, /* Add [4K, 4K) following [0, 1K) */ em = alloc_extent_map(); if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); ret = -ENOMEM; goto out; } Loading @@ -169,6 +176,7 @@ static int test_case_2(struct btrfs_fs_info *fs_info, em = alloc_extent_map(); if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); ret = -ENOMEM; goto out; } Loading Loading @@ -207,8 +215,10 @@ static int __test_case_3(struct btrfs_fs_info *fs_info, int ret; em = alloc_extent_map(); if (!em) if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); return -ENOMEM; } /* Add [4K, 8K) */ em->start = SZ_4K; Loading @@ -224,6 +234,7 @@ static int __test_case_3(struct btrfs_fs_info *fs_info, em = alloc_extent_map(); if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); ret = -ENOMEM; goto out; } Loading Loading @@ -299,8 +310,10 @@ static int __test_case_4(struct btrfs_fs_info *fs_info, int ret; em = alloc_extent_map(); if (!em) if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); return -ENOMEM; } /* Add [0K, 8K) */ em->start = 0; Loading @@ -316,6 +329,7 @@ static int __test_case_4(struct btrfs_fs_info *fs_info, em = alloc_extent_map(); if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); ret = -ENOMEM; goto out; } Loading @@ -334,6 +348,7 @@ static int __test_case_4(struct btrfs_fs_info *fs_info, em = alloc_extent_map(); if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); ret = -ENOMEM; goto out; } Loading Loading
fs/btrfs/tests/extent-map-tests.c +19 −4 Original line number Diff line number Diff line Loading @@ -56,8 +56,10 @@ static int test_case_1(struct btrfs_fs_info *fs_info, int ret; em = alloc_extent_map(); if (!em) if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); return -ENOMEM; } /* Add [0, 16K) */ em->start = 0; Loading @@ -74,6 +76,7 @@ static int test_case_1(struct btrfs_fs_info *fs_info, /* Add [16K, 20K) following [0, 16K) */ em = alloc_extent_map(); if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); ret = -ENOMEM; goto out; } Loading @@ -91,6 +94,7 @@ static int test_case_1(struct btrfs_fs_info *fs_info, em = alloc_extent_map(); if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); ret = -ENOMEM; goto out; } Loading Loading @@ -134,8 +138,10 @@ static int test_case_2(struct btrfs_fs_info *fs_info, int ret; em = alloc_extent_map(); if (!em) if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); return -ENOMEM; } /* Add [0, 1K) */ em->start = 0; Loading @@ -152,6 +158,7 @@ static int test_case_2(struct btrfs_fs_info *fs_info, /* Add [4K, 4K) following [0, 1K) */ em = alloc_extent_map(); if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); ret = -ENOMEM; goto out; } Loading @@ -169,6 +176,7 @@ static int test_case_2(struct btrfs_fs_info *fs_info, em = alloc_extent_map(); if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); ret = -ENOMEM; goto out; } Loading Loading @@ -207,8 +215,10 @@ static int __test_case_3(struct btrfs_fs_info *fs_info, int ret; em = alloc_extent_map(); if (!em) if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); return -ENOMEM; } /* Add [4K, 8K) */ em->start = SZ_4K; Loading @@ -224,6 +234,7 @@ static int __test_case_3(struct btrfs_fs_info *fs_info, em = alloc_extent_map(); if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); ret = -ENOMEM; goto out; } Loading Loading @@ -299,8 +310,10 @@ static int __test_case_4(struct btrfs_fs_info *fs_info, int ret; em = alloc_extent_map(); if (!em) if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); return -ENOMEM; } /* Add [0K, 8K) */ em->start = 0; Loading @@ -316,6 +329,7 @@ static int __test_case_4(struct btrfs_fs_info *fs_info, em = alloc_extent_map(); if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); ret = -ENOMEM; goto out; } Loading @@ -334,6 +348,7 @@ static int __test_case_4(struct btrfs_fs_info *fs_info, em = alloc_extent_map(); if (!em) { test_std_err(TEST_ALLOC_EXTENT_MAP); ret = -ENOMEM; goto out; } Loading