Lines Matching refs:btrfs_block_group

26 int btrfs_should_fragment_free_space(const struct btrfs_block_group *block_group)  in btrfs_should_fragment_free_space()
37 static inline bool has_unwritten_metadata(struct btrfs_block_group *block_group) in has_unwritten_metadata()
154 void btrfs_get_block_group(struct btrfs_block_group *cache) in btrfs_get_block_group()
159 void btrfs_put_block_group(struct btrfs_block_group *cache) in btrfs_put_block_group()
192 const struct btrfs_block_group *new_bg = in btrfs_bg_start_cmp()
193 rb_entry(new, struct btrfs_block_group, cache_node); in btrfs_bg_start_cmp()
194 const struct btrfs_block_group *exist_bg = in btrfs_bg_start_cmp()
195 rb_entry(exist, struct btrfs_block_group, cache_node); in btrfs_bg_start_cmp()
207 static int btrfs_add_block_group_cache(struct btrfs_block_group *block_group) in btrfs_add_block_group_cache()
230 static struct btrfs_block_group *block_group_cache_tree_search( in block_group_cache_tree_search()
233 struct btrfs_block_group *cache, *ret = NULL; in block_group_cache_tree_search()
241 cache = rb_entry(n, struct btrfs_block_group, cache_node); in block_group_cache_tree_search()
270 struct btrfs_block_group *btrfs_lookup_first_block_group( in btrfs_lookup_first_block_group()
279 struct btrfs_block_group *btrfs_lookup_block_group( in btrfs_lookup_block_group()
285 struct btrfs_block_group *btrfs_next_block_group( in btrfs_next_block_group()
286 struct btrfs_block_group *cache) in btrfs_next_block_group()
304 cache = rb_entry(node, struct btrfs_block_group, cache_node); in btrfs_next_block_group()
327 struct btrfs_block_group *btrfs_inc_nocow_writers(struct btrfs_fs_info *fs_info, in btrfs_inc_nocow_writers()
330 struct btrfs_block_group *bg; in btrfs_inc_nocow_writers()
364 void btrfs_dec_nocow_writers(struct btrfs_block_group *bg) in btrfs_dec_nocow_writers()
373 void btrfs_wait_nocow_writers(struct btrfs_block_group *bg) in btrfs_wait_nocow_writers()
381 struct btrfs_block_group *bg; in btrfs_dec_block_group_reservations()
390 void btrfs_wait_block_group_reservations(struct btrfs_block_group *bg) in btrfs_wait_block_group_reservations()
416 struct btrfs_block_group *cache) in btrfs_get_caching_control()
451 void btrfs_wait_block_group_cache_progress(struct btrfs_block_group *cache, in btrfs_wait_block_group_cache_progress()
476 static int btrfs_caching_ctl_wait_done(struct btrfs_block_group *cache, in btrfs_caching_ctl_wait_done()
483 static int btrfs_wait_block_group_cache_done(struct btrfs_block_group *cache) in btrfs_wait_block_group_cache_done()
497 static void fragment_free_space(struct btrfs_block_group *block_group) in fragment_free_space()
530 int btrfs_add_new_free_space(struct btrfs_block_group *block_group, u64 start, in btrfs_add_new_free_space()
591 struct btrfs_block_group *block_group, in sample_block_group_extent_item()
679 struct btrfs_block_group *block_group) in load_block_group_size_class()
713 struct btrfs_block_group *block_group = caching_ctl->block_group; in load_extent_tree_free()
846 static inline void btrfs_free_excluded_extents(const struct btrfs_block_group *bg) in btrfs_free_excluded_extents()
854 struct btrfs_block_group *block_group; in caching_thread()
926 int btrfs_cache_block_group(struct btrfs_block_group *cache, bool wait) in btrfs_cache_block_group()
1042 struct btrfs_block_group *block_group) in remove_block_group_item()
1069 struct btrfs_block_group *block_group; in btrfs_remove_block_group()
1361 static int inc_block_group_ro(struct btrfs_block_group *cache, int force) in inc_block_group_ro()
1434 const struct btrfs_block_group *bg) in clean_pinned_extents()
1488 static bool btrfs_link_bg_list(struct btrfs_block_group *bg, struct list_head *list) in btrfs_link_bg_list()
1510 struct btrfs_block_group *block_group; in btrfs_delete_unused_bgs()
1535 struct btrfs_block_group, in btrfs_delete_unused_bgs()
1769 void btrfs_mark_bg_unused(struct btrfs_block_group *bg) in btrfs_mark_bg_unused()
1793 const struct btrfs_block_group *bg1, *bg2; in reclaim_bgs_cmp()
1795 bg1 = list_entry(a, struct btrfs_block_group, bg_list); in reclaim_bgs_cmp()
1796 bg2 = list_entry(b, struct btrfs_block_group, bg_list); in reclaim_bgs_cmp()
1808 static bool should_reclaim_block_group(const struct btrfs_block_group *bg, u64 bytes_freed) in should_reclaim_block_group()
1833 struct btrfs_block_group *bg; in btrfs_reclaim_bgs_work()
1876 struct btrfs_block_group, in btrfs_reclaim_bgs_work()
2038 void btrfs_mark_bg_to_reclaim(struct btrfs_block_group *bg) in btrfs_mark_bg_to_reclaim()
2214 static int exclude_super_stripes(struct btrfs_block_group *cache) in exclude_super_stripes()
2268 static struct btrfs_block_group *btrfs_create_block_group_cache( in btrfs_create_block_group_cache()
2271 struct btrfs_block_group *cache; in btrfs_create_block_group_cache()
2320 struct btrfs_block_group *bg; in check_chunk_block_group_mappings()
2366 struct btrfs_block_group *cache; in read_one_block_group()
2490 struct btrfs_block_group *bg; in fill_dummy_bgs()
2537 struct btrfs_block_group *cache; in btrfs_read_block_groups()
2603 struct btrfs_block_group, in btrfs_read_block_groups()
2651 struct btrfs_block_group *block_group) in insert_block_group_item()
2773 struct btrfs_block_group *block_group; in btrfs_create_pending_block_groups()
2780 struct btrfs_block_group, in btrfs_create_pending_block_groups()
2878 struct btrfs_block_group *btrfs_make_block_group(struct btrfs_trans_handle *trans, in btrfs_make_block_group()
2883 struct btrfs_block_group *cache; in btrfs_make_block_group()
2975 int btrfs_inc_block_group_ro(struct btrfs_block_group *cache, in btrfs_inc_block_group_ro()
3089 void btrfs_dec_block_group_ro(struct btrfs_block_group *cache) in btrfs_dec_block_group_ro()
3120 struct btrfs_block_group *cache) in update_block_group_item()
3187 static int cache_save_setup(struct btrfs_block_group *block_group, in cache_save_setup()
3354 struct btrfs_block_group *cache, *tmp; in btrfs_setup_space_cache()
3391 struct btrfs_block_group *cache; in btrfs_start_dirty_block_groups()
3429 cache = list_first_entry(&dirty, struct btrfs_block_group, in btrfs_start_dirty_block_groups()
3556 struct btrfs_block_group *cache; in btrfs_write_dirty_block_groups()
3585 struct btrfs_block_group, in btrfs_write_dirty_block_groups()
3667 cache = list_first_entry(io, struct btrfs_block_group, in btrfs_write_dirty_block_groups()
3682 struct btrfs_block_group *cache; in btrfs_update_block_group()
3798 int btrfs_add_reserved_bytes(struct btrfs_block_group *cache, in btrfs_add_reserved_bytes()
3851 void btrfs_free_reserved_bytes(struct btrfs_block_group *cache, u64 num_bytes, in btrfs_free_reserved_bytes()
3925 static struct btrfs_block_group *do_chunk_alloc(struct btrfs_trans_handle *trans, in do_chunk_alloc()
3929 struct btrfs_block_group *bg; in do_chunk_alloc()
3987 struct btrfs_block_group *sys_bg; in do_chunk_alloc()
4143 struct btrfs_block_group *ret_bg; in btrfs_chunk_alloc()
4316 struct btrfs_block_group *bg; in reserve_chunk_space()
4414 struct btrfs_block_group *block_group; in btrfs_put_block_group_cache()
4480 struct btrfs_block_group *block_group; in btrfs_free_block_groups()
4508 struct btrfs_block_group, in btrfs_free_block_groups()
4516 struct btrfs_block_group, in btrfs_free_block_groups()
4526 struct btrfs_block_group, in btrfs_free_block_groups()
4535 block_group = rb_entry(n, struct btrfs_block_group, in btrfs_free_block_groups()
4580 void btrfs_freeze_block_group(struct btrfs_block_group *cache) in btrfs_freeze_block_group()
4585 void btrfs_unfreeze_block_group(struct btrfs_block_group *block_group) in btrfs_unfreeze_block_group()
4616 bool btrfs_inc_block_group_swap_extents(struct btrfs_block_group *bg) in btrfs_inc_block_group_swap_extents()
4630 void btrfs_dec_block_group_swap_extents(struct btrfs_block_group *bg, int amount) in btrfs_dec_block_group_swap_extents()
4667 int btrfs_use_block_group_size_class(struct btrfs_block_group *bg, in btrfs_use_block_group_size_class()
4700 bool btrfs_block_group_should_use_size_class(const struct btrfs_block_group *bg) in btrfs_block_group_should_use_size_class()