Lines Matching refs:btrfs_block_group
118 void btrfs_get_block_group(struct btrfs_block_group *cache) in btrfs_get_block_group()
123 void btrfs_put_block_group(struct btrfs_block_group *cache) in btrfs_put_block_group()
166 struct btrfs_block_group *block_group) in btrfs_add_block_group_cache()
170 struct btrfs_block_group *cache; in btrfs_add_block_group_cache()
180 cache = rb_entry(parent, struct btrfs_block_group, cache_node); in btrfs_add_block_group_cache()
205 static struct btrfs_block_group *block_group_cache_tree_search( in block_group_cache_tree_search()
208 struct btrfs_block_group *cache, *ret = NULL; in block_group_cache_tree_search()
216 cache = rb_entry(n, struct btrfs_block_group, cache_node); in block_group_cache_tree_search()
245 struct btrfs_block_group *btrfs_lookup_first_block_group( in btrfs_lookup_first_block_group()
254 struct btrfs_block_group *btrfs_lookup_block_group( in btrfs_lookup_block_group()
260 struct btrfs_block_group *btrfs_next_block_group( in btrfs_next_block_group()
261 struct btrfs_block_group *cache) in btrfs_next_block_group()
279 cache = rb_entry(node, struct btrfs_block_group, cache_node); in btrfs_next_block_group()
302 struct btrfs_block_group *btrfs_inc_nocow_writers(struct btrfs_fs_info *fs_info, in btrfs_inc_nocow_writers()
305 struct btrfs_block_group *bg; in btrfs_inc_nocow_writers()
341 void btrfs_dec_nocow_writers(struct btrfs_block_group *bg) in btrfs_dec_nocow_writers()
350 void btrfs_wait_nocow_writers(struct btrfs_block_group *bg) in btrfs_wait_nocow_writers()
358 struct btrfs_block_group *bg; in btrfs_dec_block_group_reservations()
367 void btrfs_wait_block_group_reservations(struct btrfs_block_group *bg) in btrfs_wait_block_group_reservations()
393 struct btrfs_block_group *cache) in btrfs_get_caching_control()
428 void btrfs_wait_block_group_cache_progress(struct btrfs_block_group *cache, in btrfs_wait_block_group_cache_progress()
443 static int btrfs_caching_ctl_wait_done(struct btrfs_block_group *cache, in btrfs_caching_ctl_wait_done()
450 static int btrfs_wait_block_group_cache_done(struct btrfs_block_group *cache) in btrfs_wait_block_group_cache_done()
464 static void fragment_free_space(struct btrfs_block_group *block_group) in fragment_free_space()
490 u64 add_new_free_space(struct btrfs_block_group *block_group, u64 start, u64 end) in add_new_free_space()
531 struct btrfs_block_group *block_group = caching_ctl->block_group; in load_extent_tree_free()
661 struct btrfs_block_group *block_group; in caching_thread()
732 int btrfs_cache_block_group(struct btrfs_block_group *cache, bool wait) in btrfs_cache_block_group()
840 struct btrfs_block_group *block_group) in remove_block_group_item()
867 struct btrfs_block_group *block_group; in btrfs_remove_block_group()
1166 static int inc_block_group_ro(struct btrfs_block_group *cache, int force) in inc_block_group_ro()
1239 struct btrfs_block_group *bg) in clean_pinned_extents()
1289 struct btrfs_block_group *block_group; in btrfs_delete_unused_bgs()
1313 struct btrfs_block_group, in btrfs_delete_unused_bgs()
1495 void btrfs_mark_bg_unused(struct btrfs_block_group *bg) in btrfs_mark_bg_unused()
1515 const struct btrfs_block_group *bg1, *bg2; in reclaim_bgs_cmp()
1517 bg1 = list_entry(a, struct btrfs_block_group, bg_list); in reclaim_bgs_cmp()
1518 bg2 = list_entry(b, struct btrfs_block_group, bg_list); in reclaim_bgs_cmp()
1534 struct btrfs_block_group *bg; in btrfs_reclaim_bgs_work()
1575 struct btrfs_block_group, in btrfs_reclaim_bgs_work()
1647 void btrfs_mark_bg_to_reclaim(struct btrfs_block_group *bg) in btrfs_mark_bg_to_reclaim()
1839 static int exclude_super_stripes(struct btrfs_block_group *cache) in exclude_super_stripes()
1890 static struct btrfs_block_group *btrfs_create_block_group_cache( in btrfs_create_block_group_cache()
1893 struct btrfs_block_group *cache; in btrfs_create_block_group_cache()
1941 struct btrfs_block_group *bg; in check_chunk_block_group_mappings()
1992 struct btrfs_block_group *cache; in read_one_block_group()
2113 struct btrfs_block_group *bg; in fill_dummy_bgs()
2160 struct btrfs_block_group *cache; in btrfs_read_block_groups()
2226 struct btrfs_block_group, in btrfs_read_block_groups()
2274 struct btrfs_block_group *block_group) in insert_block_group_item()
2393 struct btrfs_block_group *block_group; in btrfs_create_pending_block_groups()
2400 struct btrfs_block_group, in btrfs_create_pending_block_groups()
2462 struct btrfs_block_group *btrfs_make_block_group(struct btrfs_trans_handle *trans, in btrfs_make_block_group()
2467 struct btrfs_block_group *cache; in btrfs_make_block_group()
2553 int btrfs_inc_block_group_ro(struct btrfs_block_group *cache, in btrfs_inc_block_group_ro()
2656 void btrfs_dec_block_group_ro(struct btrfs_block_group *cache) in btrfs_dec_block_group_ro()
2686 struct btrfs_block_group *cache) in update_block_group_item()
2721 static int cache_save_setup(struct btrfs_block_group *block_group, in cache_save_setup()
2889 struct btrfs_block_group *cache, *tmp; in btrfs_setup_space_cache()
2927 struct btrfs_block_group *cache; in btrfs_start_dirty_block_groups()
2965 cache = list_first_entry(&dirty, struct btrfs_block_group, in btrfs_start_dirty_block_groups()
3093 struct btrfs_block_group *cache; in btrfs_write_dirty_block_groups()
3122 struct btrfs_block_group, in btrfs_write_dirty_block_groups()
3203 cache = list_first_entry(io, struct btrfs_block_group, in btrfs_write_dirty_block_groups()
3214 static inline bool should_reclaim_block_group(struct btrfs_block_group *bg, in should_reclaim_block_group()
3243 struct btrfs_block_group *cache = NULL; in btrfs_update_block_group()
3362 int btrfs_add_reserved_bytes(struct btrfs_block_group *cache, in btrfs_add_reserved_bytes()
3405 void btrfs_free_reserved_bytes(struct btrfs_block_group *cache, in btrfs_free_reserved_bytes()
3470 static struct btrfs_block_group *do_chunk_alloc(struct btrfs_trans_handle *trans, u64 flags) in do_chunk_alloc()
3472 struct btrfs_block_group *bg; in do_chunk_alloc()
3530 struct btrfs_block_group *sys_bg; in do_chunk_alloc()
3676 struct btrfs_block_group *ret_bg; in btrfs_chunk_alloc()
3852 struct btrfs_block_group *bg; in reserve_chunk_space()
3946 struct btrfs_block_group *block_group; in btrfs_put_block_group_cache()
3975 struct btrfs_block_group *block_group; in btrfs_free_block_groups()
3992 struct btrfs_block_group, in btrfs_free_block_groups()
4000 struct btrfs_block_group, in btrfs_free_block_groups()
4010 struct btrfs_block_group, in btrfs_free_block_groups()
4019 block_group = rb_entry(n, struct btrfs_block_group, in btrfs_free_block_groups()
4086 void btrfs_freeze_block_group(struct btrfs_block_group *cache) in btrfs_freeze_block_group()
4091 void btrfs_unfreeze_block_group(struct btrfs_block_group *block_group) in btrfs_unfreeze_block_group()
4125 bool btrfs_inc_block_group_swap_extents(struct btrfs_block_group *bg) in btrfs_inc_block_group_swap_extents()
4139 void btrfs_dec_block_group_swap_extents(struct btrfs_block_group *bg, int amount) in btrfs_dec_block_group_swap_extents()