diff options
author | David Sterba <dsterba@suse.com> | 2016-07-15 09:23:37 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-07-26 07:52:25 -0400 |
commit | 05653ef38659edc46a886c9bda105e64edba6896 (patch) | |
tree | ae523fd51224bf32e0aa53abe4af076b8d1247f7 | |
parent | aee133afcdf77641be66c5c9f32975feca8e6bd0 (diff) |
btrfs: hide test-only member under ifdef
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/ctree.h | 2 | ||||
-rw-r--r-- | fs/btrfs/extent-tree.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 83a6a931af09..8627b7f26a60 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -1181,8 +1181,10 @@ struct btrfs_root { | |||
1181 | 1181 | ||
1182 | u64 highest_objectid; | 1182 | u64 highest_objectid; |
1183 | 1183 | ||
1184 | #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS | ||
1184 | /* only used with CONFIG_BTRFS_FS_RUN_SANITY_TESTS is enabled */ | 1185 | /* only used with CONFIG_BTRFS_FS_RUN_SANITY_TESTS is enabled */ |
1185 | u64 alloc_bytenr; | 1186 | u64 alloc_bytenr; |
1187 | #endif | ||
1186 | 1188 | ||
1187 | u64 defrag_trans_start; | 1189 | u64 defrag_trans_start; |
1188 | struct btrfs_key defrag_progress; | 1190 | struct btrfs_key defrag_progress; |
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 3bb9607edc5d..81d83300c99b 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -8354,6 +8354,7 @@ struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans, | |||
8354 | bool skinny_metadata = btrfs_fs_incompat(root->fs_info, | 8354 | bool skinny_metadata = btrfs_fs_incompat(root->fs_info, |
8355 | SKINNY_METADATA); | 8355 | SKINNY_METADATA); |
8356 | 8356 | ||
8357 | #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS | ||
8357 | if (btrfs_test_is_dummy_root(root)) { | 8358 | if (btrfs_test_is_dummy_root(root)) { |
8358 | buf = btrfs_init_new_buffer(trans, root, root->alloc_bytenr, | 8359 | buf = btrfs_init_new_buffer(trans, root, root->alloc_bytenr, |
8359 | level); | 8360 | level); |
@@ -8361,6 +8362,7 @@ struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans, | |||
8361 | root->alloc_bytenr += blocksize; | 8362 | root->alloc_bytenr += blocksize; |
8362 | return buf; | 8363 | return buf; |
8363 | } | 8364 | } |
8365 | #endif | ||
8364 | 8366 | ||
8365 | block_rsv = use_block_rsv(trans, root, blocksize); | 8367 | block_rsv = use_block_rsv(trans, root, blocksize); |
8366 | if (IS_ERR(block_rsv)) | 8368 | if (IS_ERR(block_rsv)) |