diff options
author | Jeff Mahoney <jeffm@suse.com> | 2016-06-21 09:52:41 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-07-26 07:54:19 -0400 |
commit | f5ee5c9ac56cd328fcc915582f81226affebd81c (patch) | |
tree | a8794c47784f0565553233353702d02fd2e5fc28 /fs/btrfs/ctree.h | |
parent | 7c0260ee098db7a05fd68812b2e21ce2e19dfcf0 (diff) |
btrfs: tests, use BTRFS_FS_STATE_DUMMY_FS_INFO instead of dummy root
Now that we have a dummy fs_info associated with each test that
uses a root, we don't need the DUMMY_ROOT bit anymore. This lets
us make choices without needing an actual root like in e.g.
btrfs_find_create_tree_block.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 1cb84e01f2fd..41d5ca986c0c 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -1115,12 +1115,11 @@ struct btrfs_subvolume_writers { | |||
1115 | #define BTRFS_ROOT_REF_COWS 1 | 1115 | #define BTRFS_ROOT_REF_COWS 1 |
1116 | #define BTRFS_ROOT_TRACK_DIRTY 2 | 1116 | #define BTRFS_ROOT_TRACK_DIRTY 2 |
1117 | #define BTRFS_ROOT_IN_RADIX 3 | 1117 | #define BTRFS_ROOT_IN_RADIX 3 |
1118 | #define BTRFS_ROOT_DUMMY_ROOT 4 | 1118 | #define BTRFS_ROOT_ORPHAN_ITEM_INSERTED 4 |
1119 | #define BTRFS_ROOT_ORPHAN_ITEM_INSERTED 5 | 1119 | #define BTRFS_ROOT_DEFRAG_RUNNING 5 |
1120 | #define BTRFS_ROOT_DEFRAG_RUNNING 6 | 1120 | #define BTRFS_ROOT_FORCE_COW 6 |
1121 | #define BTRFS_ROOT_FORCE_COW 7 | 1121 | #define BTRFS_ROOT_MULTI_LOG_TASKS 7 |
1122 | #define BTRFS_ROOT_MULTI_LOG_TASKS 8 | 1122 | #define BTRFS_ROOT_DIRTY 8 |
1123 | #define BTRFS_ROOT_DIRTY 9 | ||
1124 | 1123 | ||
1125 | /* | 1124 | /* |
1126 | * in ram representation of the tree. extent_root is used for all allocations | 1125 | * in ram representation of the tree. extent_root is used for all allocations |
@@ -3613,13 +3612,13 @@ static inline int btrfs_defrag_cancelled(struct btrfs_fs_info *fs_info) | |||
3613 | void btrfs_test_destroy_inode(struct inode *inode); | 3612 | void btrfs_test_destroy_inode(struct inode *inode); |
3614 | #endif | 3613 | #endif |
3615 | 3614 | ||
3616 | static inline int btrfs_test_is_dummy_root(struct btrfs_root *root) | 3615 | static inline int btrfs_is_testing(struct btrfs_fs_info *fs_info) |
3617 | { | 3616 | { |
3618 | #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS | 3617 | #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS |
3619 | if (unlikely(test_bit(BTRFS_ROOT_DUMMY_ROOT, &root->state))) | 3618 | if (unlikely(test_bit(BTRFS_FS_STATE_DUMMY_FS_INFO, |
3619 | &fs_info->fs_state))) | ||
3620 | return 1; | 3620 | return 1; |
3621 | #endif | 3621 | #endif |
3622 | return 0; | 3622 | return 0; |
3623 | } | 3623 | } |
3624 | |||
3625 | #endif | 3624 | #endif |