Commit 05653ef3 authored by David Sterba's avatar David Sterba

btrfs: hide test-only member under ifdef

Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent aee133af
...@@ -1181,8 +1181,10 @@ struct btrfs_root { ...@@ -1181,8 +1181,10 @@ struct btrfs_root {
u64 highest_objectid; u64 highest_objectid;
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
/* only used with CONFIG_BTRFS_FS_RUN_SANITY_TESTS is enabled */ /* only used with CONFIG_BTRFS_FS_RUN_SANITY_TESTS is enabled */
u64 alloc_bytenr; u64 alloc_bytenr;
#endif
u64 defrag_trans_start; u64 defrag_trans_start;
struct btrfs_key defrag_progress; struct btrfs_key defrag_progress;
......
...@@ -8354,6 +8354,7 @@ struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans, ...@@ -8354,6 +8354,7 @@ struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans,
bool skinny_metadata = btrfs_fs_incompat(root->fs_info, bool skinny_metadata = btrfs_fs_incompat(root->fs_info,
SKINNY_METADATA); SKINNY_METADATA);
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
if (btrfs_test_is_dummy_root(root)) { if (btrfs_test_is_dummy_root(root)) {
buf = btrfs_init_new_buffer(trans, root, root->alloc_bytenr, buf = btrfs_init_new_buffer(trans, root, root->alloc_bytenr,
level); level);
...@@ -8361,6 +8362,7 @@ struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans, ...@@ -8361,6 +8362,7 @@ struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans,
root->alloc_bytenr += blocksize; root->alloc_bytenr += blocksize;
return buf; return buf;
} }
#endif
block_rsv = use_block_rsv(trans, root, blocksize); block_rsv = use_block_rsv(trans, root, blocksize);
if (IS_ERR(block_rsv)) if (IS_ERR(block_rsv))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment