|
@@ -3235,7 +3235,7 @@ static int __btrfs_mod_ref(struct btrfs_trans_handle *trans,
|
|
u64, u64, u64, u64, u64, u64);
|
|
u64, u64, u64, u64, u64, u64);
|
|
|
|
|
|
|
|
|
|
- if (btrfs_test_is_dummy_root(root))
|
|
|
|
|
|
+ if (btrfs_is_testing(root->fs_info))
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
ref_root = btrfs_header_owner(buf);
|
|
ref_root = btrfs_header_owner(buf);
|
|
@@ -6101,7 +6101,7 @@ void btrfs_delalloc_release_metadata(struct inode *inode, u64 num_bytes)
|
|
if (dropped > 0)
|
|
if (dropped > 0)
|
|
to_free += btrfs_calc_trans_metadata_size(root, dropped);
|
|
to_free += btrfs_calc_trans_metadata_size(root, dropped);
|
|
|
|
|
|
- if (btrfs_test_is_dummy_root(root))
|
|
|
|
|
|
+ if (btrfs_is_testing(root->fs_info))
|
|
return;
|
|
return;
|
|
|
|
|
|
trace_btrfs_space_reservation(root->fs_info, "delalloc",
|
|
trace_btrfs_space_reservation(root->fs_info, "delalloc",
|
|
@@ -7217,7 +7217,7 @@ int btrfs_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root,
|
|
int ret;
|
|
int ret;
|
|
struct btrfs_fs_info *fs_info = root->fs_info;
|
|
struct btrfs_fs_info *fs_info = root->fs_info;
|
|
|
|
|
|
- if (btrfs_test_is_dummy_root(root))
|
|
|
|
|
|
+ if (btrfs_is_testing(fs_info))
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
add_pinned_bytes(root->fs_info, num_bytes, owner, root_objectid);
|
|
add_pinned_bytes(root->fs_info, num_bytes, owner, root_objectid);
|
|
@@ -8356,7 +8356,7 @@ struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans,
|
|
SKINNY_METADATA);
|
|
SKINNY_METADATA);
|
|
|
|
|
|
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
|
|
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
|
|
- if (btrfs_test_is_dummy_root(root)) {
|
|
|
|
|
|
+ if (btrfs_is_testing(root->fs_info)) {
|
|
buf = btrfs_init_new_buffer(trans, root, root->alloc_bytenr,
|
|
buf = btrfs_init_new_buffer(trans, root, root->alloc_bytenr,
|
|
level);
|
|
level);
|
|
if (!IS_ERR(buf))
|
|
if (!IS_ERR(buf))
|