diff options
Diffstat (limited to 'fs/btrfs/disk-io.h')
-rw-r--r-- | fs/btrfs/disk-io.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h index b71acd6e1e5b..53059df350f8 100644 --- a/fs/btrfs/disk-io.h +++ b/fs/btrfs/disk-io.h | |||
@@ -68,8 +68,17 @@ struct btrfs_root *btrfs_read_fs_root(struct btrfs_root *tree_root, | |||
68 | int btrfs_init_fs_root(struct btrfs_root *root); | 68 | int btrfs_init_fs_root(struct btrfs_root *root); |
69 | int btrfs_insert_fs_root(struct btrfs_fs_info *fs_info, | 69 | int btrfs_insert_fs_root(struct btrfs_fs_info *fs_info, |
70 | struct btrfs_root *root); | 70 | struct btrfs_root *root); |
71 | struct btrfs_root *btrfs_read_fs_root_no_name(struct btrfs_fs_info *fs_info, | 71 | |
72 | struct btrfs_key *location); | 72 | struct btrfs_root *btrfs_get_fs_root(struct btrfs_fs_info *fs_info, |
73 | struct btrfs_key *key, | ||
74 | bool check_ref); | ||
75 | static inline struct btrfs_root * | ||
76 | btrfs_read_fs_root_no_name(struct btrfs_fs_info *fs_info, | ||
77 | struct btrfs_key *location) | ||
78 | { | ||
79 | return btrfs_get_fs_root(fs_info, location, true); | ||
80 | } | ||
81 | |||
73 | int btrfs_cleanup_fs_roots(struct btrfs_fs_info *fs_info); | 82 | int btrfs_cleanup_fs_roots(struct btrfs_fs_info *fs_info); |
74 | void btrfs_btree_balance_dirty(struct btrfs_root *root); | 83 | void btrfs_btree_balance_dirty(struct btrfs_root *root); |
75 | void btrfs_btree_balance_dirty_nodelay(struct btrfs_root *root); | 84 | void btrfs_btree_balance_dirty_nodelay(struct btrfs_root *root); |
@@ -77,6 +86,10 @@ void btrfs_drop_and_free_fs_root(struct btrfs_fs_info *fs_info, | |||
77 | struct btrfs_root *root); | 86 | struct btrfs_root *root); |
78 | void btrfs_free_fs_root(struct btrfs_root *root); | 87 | void btrfs_free_fs_root(struct btrfs_root *root); |
79 | 88 | ||
89 | #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS | ||
90 | struct btrfs_root *btrfs_alloc_dummy_root(void); | ||
91 | #endif | ||
92 | |||
80 | /* | 93 | /* |
81 | * This function is used to grab the root, and avoid it is freed when we | 94 | * This function is used to grab the root, and avoid it is freed when we |
82 | * access it. But it doesn't ensure that the tree is not dropped. | 95 | * access it. But it doesn't ensure that the tree is not dropped. |