.. | .. |
---|
6 | 6 | #ifndef BTRFS_FREE_SPACE_TREE_H |
---|
7 | 7 | #define BTRFS_FREE_SPACE_TREE_H |
---|
8 | 8 | |
---|
| 9 | +struct btrfs_caching_control; |
---|
| 10 | + |
---|
9 | 11 | /* |
---|
10 | 12 | * The default size for new free space bitmap items. The last bitmap in a block |
---|
11 | 13 | * group may be truncated, and none of the free space tree code assumes that |
---|
.. | .. |
---|
14 | 16 | #define BTRFS_FREE_SPACE_BITMAP_SIZE 256 |
---|
15 | 17 | #define BTRFS_FREE_SPACE_BITMAP_BITS (BTRFS_FREE_SPACE_BITMAP_SIZE * BITS_PER_BYTE) |
---|
16 | 18 | |
---|
17 | | -void set_free_space_tree_thresholds(struct btrfs_block_group_cache *block_group); |
---|
| 19 | +void set_free_space_tree_thresholds(struct btrfs_block_group *block_group); |
---|
18 | 20 | int btrfs_create_free_space_tree(struct btrfs_fs_info *fs_info); |
---|
19 | 21 | int btrfs_clear_free_space_tree(struct btrfs_fs_info *fs_info); |
---|
20 | 22 | int load_free_space_tree(struct btrfs_caching_control *caching_ctl); |
---|
21 | 23 | int add_block_group_free_space(struct btrfs_trans_handle *trans, |
---|
22 | | - struct btrfs_block_group_cache *block_group); |
---|
| 24 | + struct btrfs_block_group *block_group); |
---|
23 | 25 | int remove_block_group_free_space(struct btrfs_trans_handle *trans, |
---|
24 | | - struct btrfs_block_group_cache *block_group); |
---|
| 26 | + struct btrfs_block_group *block_group); |
---|
25 | 27 | int add_to_free_space_tree(struct btrfs_trans_handle *trans, |
---|
26 | 28 | u64 start, u64 size); |
---|
27 | 29 | int remove_from_free_space_tree(struct btrfs_trans_handle *trans, |
---|
.. | .. |
---|
30 | 32 | #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS |
---|
31 | 33 | struct btrfs_free_space_info * |
---|
32 | 34 | search_free_space_info(struct btrfs_trans_handle *trans, |
---|
33 | | - struct btrfs_fs_info *fs_info, |
---|
34 | | - struct btrfs_block_group_cache *block_group, |
---|
| 35 | + struct btrfs_block_group *block_group, |
---|
35 | 36 | struct btrfs_path *path, int cow); |
---|
36 | 37 | int __add_to_free_space_tree(struct btrfs_trans_handle *trans, |
---|
37 | | - struct btrfs_block_group_cache *block_group, |
---|
| 38 | + struct btrfs_block_group *block_group, |
---|
38 | 39 | struct btrfs_path *path, u64 start, u64 size); |
---|
39 | 40 | int __remove_from_free_space_tree(struct btrfs_trans_handle *trans, |
---|
40 | | - struct btrfs_block_group_cache *block_group, |
---|
| 41 | + struct btrfs_block_group *block_group, |
---|
41 | 42 | struct btrfs_path *path, u64 start, u64 size); |
---|
42 | 43 | int convert_free_space_to_bitmaps(struct btrfs_trans_handle *trans, |
---|
43 | | - struct btrfs_block_group_cache *block_group, |
---|
| 44 | + struct btrfs_block_group *block_group, |
---|
44 | 45 | struct btrfs_path *path); |
---|
45 | 46 | int convert_free_space_to_extents(struct btrfs_trans_handle *trans, |
---|
46 | | - struct btrfs_block_group_cache *block_group, |
---|
| 47 | + struct btrfs_block_group *block_group, |
---|
47 | 48 | struct btrfs_path *path); |
---|
48 | | -int free_space_test_bit(struct btrfs_block_group_cache *block_group, |
---|
| 49 | +int free_space_test_bit(struct btrfs_block_group *block_group, |
---|
49 | 50 | struct btrfs_path *path, u64 offset); |
---|
50 | 51 | #endif |
---|
51 | 52 | |
---|