Home
last modified time | relevance | path

Searched refs:block_group (Results 1 – 25 of 34) sorted by relevance

12

/fs/btrfs/
Ddiscard.c71 struct btrfs_block_group *block_group) in get_discard_list() argument
73 return &discard_ctl->discard_list[block_group->discard_index]; in get_discard_list()
94 struct btrfs_block_group *block_group) in __add_to_discard_list() argument
100 if (list_empty(&block_group->discard_list) || in __add_to_discard_list()
101 block_group->discard_index == BTRFS_DISCARD_INDEX_UNUSED) { in __add_to_discard_list()
102 if (block_group->discard_index == BTRFS_DISCARD_INDEX_UNUSED) in __add_to_discard_list()
103 block_group->discard_index = BTRFS_DISCARD_INDEX_START; in __add_to_discard_list()
104 block_group->discard_eligible_time = (ktime_get_ns() + in __add_to_discard_list()
106 block_group->discard_state = BTRFS_DISCARD_RESET_CURSOR; in __add_to_discard_list()
108 if (list_empty(&block_group->discard_list)) in __add_to_discard_list()
[all …]
Dfree-space-tree.c21 struct btrfs_block_group *block_group,
25 struct btrfs_block_group *block_group) in btrfs_free_space_root() argument
33 if (btrfs_fs_incompat(block_group->fs_info, EXTENT_TREE_V2)) in btrfs_free_space_root()
34 key.offset = block_group->global_root_id; in btrfs_free_space_root()
35 return btrfs_global_root(block_group->fs_info, &key); in btrfs_free_space_root()
70 struct btrfs_block_group *block_group, in add_new_free_space_info() argument
73 struct btrfs_root *root = btrfs_free_space_root(block_group); in add_new_free_space_info()
79 key.objectid = block_group->start; in add_new_free_space_info()
81 key.offset = block_group->length; in add_new_free_space_info()
103 struct btrfs_block_group *block_group, in search_free_space_info() argument
[all …]
Dfree-space-cache.c129 struct inode *lookup_free_space_inode(struct btrfs_block_group *block_group, in lookup_free_space_inode() argument
132 struct btrfs_fs_info *fs_info = block_group->fs_info; in lookup_free_space_inode()
136 spin_lock(&block_group->lock); in lookup_free_space_inode()
137 if (block_group->inode) in lookup_free_space_inode()
138 inode = igrab(block_group->inode); in lookup_free_space_inode()
139 spin_unlock(&block_group->lock); in lookup_free_space_inode()
144 block_group->start); in lookup_free_space_inode()
148 spin_lock(&block_group->lock); in lookup_free_space_inode()
153 block_group->disk_cache_state = BTRFS_DC_CLEAR; in lookup_free_space_inode()
156 if (!test_and_set_bit(BLOCK_GROUP_FLAG_IREF, &block_group->runtime_flags)) in lookup_free_space_inode()
[all …]
Dblock-group.c26 int btrfs_should_fragment_free_space(struct btrfs_block_group *block_group) in btrfs_should_fragment_free_space() argument
28 struct btrfs_fs_info *fs_info = block_group->fs_info; in btrfs_should_fragment_free_space()
31 block_group->flags & BTRFS_BLOCK_GROUP_METADATA) || in btrfs_should_fragment_free_space()
33 block_group->flags & BTRFS_BLOCK_GROUP_DATA); in btrfs_should_fragment_free_space()
180 struct btrfs_block_group *block_group) in btrfs_add_block_group_cache() argument
187 ASSERT(block_group->length != 0); in btrfs_add_block_group_cache()
195 if (block_group->start < cache->start) { in btrfs_add_block_group_cache()
197 } else if (block_group->start > cache->start) { in btrfs_add_block_group_cache()
206 rb_link_node(&block_group->cache_node, parent, p); in btrfs_add_block_group_cache()
207 rb_insert_color_cached(&block_group->cache_node, in btrfs_add_block_group_cache()
[all …]
Dfree-space-cache.h70 struct btrfs_block_group *block_group; member
95 struct inode *lookup_free_space_inode(struct btrfs_block_group *block_group,
98 struct btrfs_block_group *block_group,
102 struct btrfs_block_group *block_group);
105 struct btrfs_block_group *block_group,
107 int load_free_space_cache(struct btrfs_block_group *block_group);
109 struct btrfs_block_group *block_group,
112 struct btrfs_block_group *block_group,
115 void btrfs_init_free_space_ctl(struct btrfs_block_group *block_group,
117 int __btrfs_add_free_space(struct btrfs_block_group *block_group, u64 bytenr,
[all …]
Dzoned.c68 static void wait_eb_writebacks(struct btrfs_block_group *block_group);
69 static int do_zone_finish(struct btrfs_block_group *block_group, bool fully_written);
1768 struct btrfs_block_group *block_group = ctx->zoned_bg; in check_bg_is_active() local
1769 struct btrfs_fs_info *fs_info = block_group->fs_info; in check_bg_is_active()
1771 if (test_bit(BLOCK_GROUP_FLAG_ZONE_IS_ACTIVE, &block_group->runtime_flags)) in check_bg_is_active()
1774 if (fs_info->treelog_bg == block_group->start) { in check_bg_is_active()
1775 if (!btrfs_zone_activate(block_group)) { in check_bg_is_active()
1778 if (ret_fin != 1 || !btrfs_zone_activate(block_group)) in check_bg_is_active()
1781 } else if (*active_bg != block_group) { in check_bg_is_active()
1808 if (!btrfs_zone_activate(block_group)) in check_bg_is_active()
[all …]
Dfree-space-tree.h19 void set_free_space_tree_thresholds(struct btrfs_block_group *block_group);
25 struct btrfs_block_group *block_group);
27 struct btrfs_block_group *block_group);
36 struct btrfs_block_group *block_group,
39 struct btrfs_block_group *block_group,
42 struct btrfs_block_group *block_group,
45 struct btrfs_block_group *block_group,
48 struct btrfs_block_group *block_group,
50 int free_space_test_bit(struct btrfs_block_group *block_group,
Dextent-tree.c2607 struct btrfs_block_group *block_group; in __exclude_logged_extent() local
2609 block_group = btrfs_lookup_block_group(fs_info, start); in __exclude_logged_extent()
2610 if (!block_group) in __exclude_logged_extent()
2613 ret = btrfs_cache_block_group(block_group, true); in __exclude_logged_extent()
2617 ret = btrfs_remove_free_space(block_group, start, num_bytes); in __exclude_logged_extent()
2619 btrfs_put_block_group(block_group); in __exclude_logged_extent()
2787 struct btrfs_block_group *block_group, *tmp; in btrfs_finish_extent_commit() local
2828 list_for_each_entry_safe(block_group, tmp, deleted_bgs, bg_list) { in btrfs_finish_extent_commit()
2834 block_group->start, in btrfs_finish_extent_commit()
2835 block_group->length, in btrfs_finish_extent_commit()
[all …]
Dblock-group.h92 struct btrfs_block_group *block_group; member
253 static inline u64 btrfs_block_group_end(struct btrfs_block_group *block_group) in btrfs_block_group_end() argument
255 return (block_group->start + block_group->length); in btrfs_block_group_end()
266 struct btrfs_block_group *block_group) in btrfs_is_block_group_data_only() argument
272 return (block_group->flags & BTRFS_BLOCK_GROUP_DATA) && in btrfs_is_block_group_data_only()
273 !(block_group->flags & BTRFS_BLOCK_GROUP_METADATA); in btrfs_is_block_group_data_only()
277 int btrfs_should_fragment_free_space(struct btrfs_block_group *block_group);
301 int btrfs_add_new_free_space(struct btrfs_block_group *block_group,
Ddiscard.h18 void btrfs_discard_check_filter(struct btrfs_block_group *block_group, u64 bytes);
22 struct btrfs_block_group *block_group);
24 struct btrfs_block_group *block_group);
30 void btrfs_discard_update_discardable(struct btrfs_block_group *block_group);
Dspace-info.c300 struct btrfs_block_group *block_group) in btrfs_add_bg_to_space_info() argument
305 factor = btrfs_bg_type_to_factor(block_group->flags); in btrfs_add_bg_to_space_info()
307 found = btrfs_find_space_info(info, block_group->flags); in btrfs_add_bg_to_space_info()
310 found->total_bytes += block_group->length; in btrfs_add_bg_to_space_info()
311 found->disk_total += block_group->length * factor; in btrfs_add_bg_to_space_info()
312 found->bytes_used += block_group->used; in btrfs_add_bg_to_space_info()
313 found->disk_used += block_group->used * factor; in btrfs_add_bg_to_space_info()
314 found->bytes_readonly += block_group->bytes_super; in btrfs_add_bg_to_space_info()
315 btrfs_space_info_update_bytes_zone_unusable(info, found, block_group->zone_unusable); in btrfs_add_bg_to_space_info()
316 if (block_group->length > 0) in btrfs_add_bg_to_space_info()
[all …]
Drelocation.c129 struct btrfs_block_group *block_group; member
174 in_range(node->bytenr, rc->block_group->start, in mark_block_processed()
175 rc->block_group->length)) { in mark_block_processed()
1109 if (!in_range(bytenr, rc->block_group->start, in replace_file_extents()
1110 rc->block_group->length)) in replace_file_extents()
1367 rc->block_group, parent, slot, in replace_path()
3262 btrfs_err(rc->block_group->fs_info, in add_tree_block()
3366 struct btrfs_block_group *block_group, in delete_block_group_cache() argument
3393 ret = btrfs_truncate_free_space_cache(trans, block_group, inode); in delete_block_group_cache()
3407 struct btrfs_block_group *block_group, in delete_v1_space_cache() argument
[all …]
Dzoned.h71 bool btrfs_zone_activate(struct btrfs_block_group *block_group);
72 int btrfs_zone_finish(struct btrfs_block_group *block_group);
214 static inline bool btrfs_zone_activate(struct btrfs_block_group *block_group) in btrfs_zone_activate() argument
219 static inline int btrfs_zone_finish(struct btrfs_block_group *block_group) in btrfs_zone_finish() argument
Dspace-info.h204 struct btrfs_block_group *block_group);
Dfs.h295 struct btrfs_block_group *block_group; member
320 struct btrfs_block_group *block_group; member
Dvolumes.c3257 struct btrfs_block_group *block_group; in btrfs_relocate_chunk() local
3295 block_group = btrfs_lookup_block_group(fs_info, chunk_offset); in btrfs_relocate_chunk()
3296 if (!block_group) in btrfs_relocate_chunk()
3298 btrfs_discard_cancel_work(&fs_info->discard_ctl, block_group); in btrfs_relocate_chunk()
3299 length = block_group->length; in btrfs_relocate_chunk()
3300 btrfs_put_block_group(block_group); in btrfs_relocate_chunk()
5400 struct btrfs_block_group *block_group; in create_chunk() local
5451 block_group = btrfs_make_block_group(trans, type, start, ctl->chunk_size); in create_chunk()
5452 if (IS_ERR(block_group)) in create_chunk()
5472 return block_group; in create_chunk()
[all …]
/fs/ext4/
Dballoc.c27 ext4_group_t block_group);
75 ext4_group_t block_group) in ext4_block_in_group() argument
80 return (actual_group == block_group) ? 1 : 0; in ext4_block_in_group()
88 ext4_group_t block_group, in ext4_num_overhead_clusters() argument
94 ext4_fsblk_t start = ext4_group_first_block_no(sb, block_group); in ext4_num_overhead_clusters()
102 base_clusters = ext4_num_base_meta_clusters(sb, block_group); in ext4_num_overhead_clusters()
137 if (ext4_block_in_group(sb, ext4_block_bitmap(sb, gdp), block_group)) { in ext4_num_overhead_clusters()
146 if (ext4_block_in_group(sb, ext4_inode_bitmap(sb, gdp), block_group)) { in ext4_num_overhead_clusters()
164 ext4_group_t block_group) in num_clusters_in_group() argument
168 if (block_group == ext4_get_groups_count(sb) - 1) { in num_clusters_in_group()
[all …]
Dialloc.c81 ext4_group_t block_group, in ext4_validate_inode_bitmap() argument
90 grp = ext4_get_group_info(sb, block_group); in ext4_validate_inode_bitmap()
97 ext4_lock_group(sb, block_group); in ext4_validate_inode_bitmap()
104 ext4_unlock_group(sb, block_group); in ext4_validate_inode_bitmap()
106 "inode_bitmap = %llu", block_group, blk); in ext4_validate_inode_bitmap()
107 ext4_mark_group_bitmap_corrupted(sb, block_group, in ext4_validate_inode_bitmap()
113 ext4_unlock_group(sb, block_group); in ext4_validate_inode_bitmap()
124 ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group) in ext4_read_inode_bitmap() argument
132 desc = ext4_get_group_desc(sb, block_group, NULL); in ext4_read_inode_bitmap()
140 "block_group %u", bitmap_blk, block_group); in ext4_read_inode_bitmap()
[all …]
Dmballoc.c3841 ext4_group_t block_group, ext4_grpblk_t cluster, int count, in ext4_issue_discard() argument
3847 ext4_group_first_block_no(sb, block_group)); in ext4_issue_discard()
6464 ext4_group_t block_group; in ext4_mb_clear_bb() local
6484 ext4_get_group_no_and_offset(sb, block, &block_group, &bit); in ext4_mb_clear_bb()
6486 grp = ext4_get_group_info(sb, block_group); in ext4_mb_clear_bb()
6502 bitmap_bh = ext4_read_block_bitmap(sb, block_group); in ext4_mb_clear_bb()
6508 gdp = ext4_get_group_desc(sb, block_group, &gd_bh); in ext4_mb_clear_bb()
6544 trace_ext4_mballoc_free(sb, inode, block_group, bit, count_clusters); in ext4_mb_clear_bb()
6547 err = ext4_mb_load_buddy_gfp(sb, block_group, &e4b, in ext4_mb_clear_bb()
6569 new_entry->efd_group = block_group; in ext4_mb_clear_bb()
[all …]
Dext4.h2513 ext4_group_t block_group; member
2711 ext4_group_t block_group,
2718 ext4_group_t block_group,
2721 ext4_group_t block_group,
2724 ext4_group_t block_group);
2726 ext4_group_t block_group,
3090 ext4_group_t block_group,
3093 ext4_group_t block_group);
3339 ext4_group_t block_group) in ext4_flex_group() argument
3341 return block_group >> sbi->s_log_groups_per_flex; in ext4_flex_group()
/fs/udf/
Dballoc.c79 unsigned int block_group) in __load_block_bitmap() argument
84 if (block_group >= nr_groups) { in __load_block_bitmap()
86 block_group, nr_groups); in __load_block_bitmap()
89 if (bitmap->s_block_bitmap[block_group]) { in __load_block_bitmap()
94 if (IS_ERR(bitmap->s_block_bitmap[block_group])) in __load_block_bitmap()
95 return PTR_ERR(bitmap->s_block_bitmap[block_group]); in __load_block_bitmap()
96 return block_group; in __load_block_bitmap()
99 retval = read_block_bitmap(sb, bitmap, block_group, block_group); in __load_block_bitmap()
103 return block_group; in __load_block_bitmap()
108 unsigned int block_group) in load_block_bitmap() argument
[all …]
/fs/ext2/
Dballoc.c40 unsigned int block_group, in ext2_get_group_desc() argument
48 if (block_group >= sbi->s_groups_count) { in ext2_get_group_desc()
51 block_group, sbi->s_groups_count); in ext2_get_group_desc()
56 group_desc = block_group >> EXT2_DESC_PER_BLOCK_BITS(sb); in ext2_get_group_desc()
57 offset = block_group & (EXT2_DESC_PER_BLOCK(sb) - 1); in ext2_get_group_desc()
61 block_group, group_desc, offset); in ext2_get_group_desc()
73 unsigned int block_group, in ext2_valid_block_bitmap() argument
82 group_first_block = ext2_group_first_block_no(sb, block_group); in ext2_valid_block_bitmap()
83 max_bit = ext2_group_last_block_no(sb, block_group) - group_first_block; in ext2_valid_block_bitmap()
118 block_group, bitmap_blk); in ext2_valid_block_bitmap()
[all …]
Dialloc.c47 read_inode_bitmap(struct super_block * sb, unsigned long block_group) in read_inode_bitmap() argument
52 desc = ext2_get_group_desc(sb, block_group, NULL); in read_inode_bitmap()
61 block_group, le32_to_cpu(desc->bg_inode_bitmap)); in read_inode_bitmap()
111 unsigned long block_group; in ext2_free_inode() local
135 block_group = (ino - 1) / EXT2_INODES_PER_GROUP(sb); in ext2_free_inode()
137 bitmap_bh = read_inode_bitmap(sb, block_group); in ext2_free_inode()
142 if (!ext2_clear_bit_atomic(sb_bgl_lock(EXT2_SB(sb), block_group), in ext2_free_inode()
147 ext2_release_inode(sb, block_group, is_directory); in ext2_free_inode()
169 unsigned long block_group; in ext2_preread_inode() local
174 block_group = (inode->i_ino - 1) / EXT2_INODES_PER_GROUP(inode->i_sb); in ext2_preread_inode()
[all …]
Dext2.h122 sb_bgl_lock(struct ext2_sb_info *sbi, unsigned int block_group) in sb_bgl_lock() argument
124 return bgl_lock_ptr(sbi->s_blockgroup_lock, block_group); in sb_bgl_lock()
712 unsigned int block_group,
/fs/nilfs2/
Dmdt.h110 nilfs_mdt_bgl_lock(struct inode *inode, unsigned int block_group) in nilfs_mdt_bgl_lock() argument
112 return bgl_lock_ptr(NILFS_MDT(inode)->mi_bgl, block_group); in nilfs_mdt_bgl_lock()

12