/linux-6.1.9/fs/btrfs/ |
D | discard.c | 72 struct btrfs_block_group *block_group) in get_discard_list() argument 74 return &discard_ctl->discard_list[block_group->discard_index]; in get_discard_list() 78 struct btrfs_block_group *block_group) in __add_to_discard_list() argument 83 if (list_empty(&block_group->discard_list) || in __add_to_discard_list() 84 block_group->discard_index == BTRFS_DISCARD_INDEX_UNUSED) { in __add_to_discard_list() 85 if (block_group->discard_index == BTRFS_DISCARD_INDEX_UNUSED) in __add_to_discard_list() 86 block_group->discard_index = BTRFS_DISCARD_INDEX_START; in __add_to_discard_list() 87 block_group->discard_eligible_time = (ktime_get_ns() + in __add_to_discard_list() 89 block_group->discard_state = BTRFS_DISCARD_RESET_CURSOR; in __add_to_discard_list() 92 list_move_tail(&block_group->discard_list, in __add_to_discard_list() [all …]
|
D | free-space-tree.c | 16 struct btrfs_block_group *block_group, 20 struct btrfs_block_group *block_group) in btrfs_free_space_root() argument 28 if (btrfs_fs_incompat(block_group->fs_info, EXTENT_TREE_V2)) in btrfs_free_space_root() 29 key.offset = block_group->global_root_id; in btrfs_free_space_root() 30 return btrfs_global_root(block_group->fs_info, &key); in btrfs_free_space_root() 65 struct btrfs_block_group *block_group, in add_new_free_space_info() argument 68 struct btrfs_root *root = btrfs_free_space_root(block_group); in add_new_free_space_info() 74 key.objectid = block_group->start; in add_new_free_space_info() 76 key.offset = block_group->length; in add_new_free_space_info() 98 struct btrfs_block_group *block_group, in search_free_space_info() argument [all …]
|
D | free-space-cache.c | 120 struct inode *lookup_free_space_inode(struct btrfs_block_group *block_group, in lookup_free_space_inode() argument 123 struct btrfs_fs_info *fs_info = block_group->fs_info; in lookup_free_space_inode() 127 spin_lock(&block_group->lock); in lookup_free_space_inode() 128 if (block_group->inode) in lookup_free_space_inode() 129 inode = igrab(block_group->inode); in lookup_free_space_inode() 130 spin_unlock(&block_group->lock); in lookup_free_space_inode() 135 block_group->start); in lookup_free_space_inode() 139 spin_lock(&block_group->lock); in lookup_free_space_inode() 144 block_group->disk_cache_state = BTRFS_DC_CLEAR; in lookup_free_space_inode() 147 if (!test_and_set_bit(BLOCK_GROUP_FLAG_IREF, &block_group->runtime_flags)) in lookup_free_space_inode() [all …]
|
D | free-space-cache.h | 59 struct btrfs_block_group *block_group; member 82 struct inode *lookup_free_space_inode(struct btrfs_block_group *block_group, 85 struct btrfs_block_group *block_group, 89 struct btrfs_block_group *block_group); 94 struct btrfs_block_group *block_group, 96 int load_free_space_cache(struct btrfs_block_group *block_group); 98 struct btrfs_block_group *block_group, 101 struct btrfs_block_group *block_group, 104 void btrfs_init_free_space_ctl(struct btrfs_block_group *block_group, 106 int __btrfs_add_free_space(struct btrfs_block_group *block_group, u64 bytenr, [all …]
|
D | block-group.c | 166 struct btrfs_block_group *block_group) in btrfs_add_block_group_cache() argument 173 ASSERT(block_group->length != 0); in btrfs_add_block_group_cache() 181 if (block_group->start < cache->start) { in btrfs_add_block_group_cache() 183 } else if (block_group->start > cache->start) { in btrfs_add_block_group_cache() 192 rb_link_node(&block_group->cache_node, parent, p); in btrfs_add_block_group_cache() 193 rb_insert_color_cached(&block_group->cache_node, in btrfs_add_block_group_cache() 464 static void fragment_free_space(struct btrfs_block_group *block_group) in fragment_free_space() argument 466 struct btrfs_fs_info *fs_info = block_group->fs_info; in fragment_free_space() 467 u64 start = block_group->start; in fragment_free_space() 468 u64 len = block_group->length; in fragment_free_space() [all …]
|
D | free-space-tree.h | 19 void set_free_space_tree_thresholds(struct btrfs_block_group *block_group); 24 struct btrfs_block_group *block_group); 26 struct btrfs_block_group *block_group); 35 struct btrfs_block_group *block_group, 38 struct btrfs_block_group *block_group, 41 struct btrfs_block_group *block_group, 44 struct btrfs_block_group *block_group, 47 struct btrfs_block_group *block_group, 49 int free_space_test_bit(struct btrfs_block_group *block_group,
|
D | zoned.c | 1874 bool btrfs_zone_activate(struct btrfs_block_group *block_group) in btrfs_zone_activate() argument 1876 struct btrfs_fs_info *fs_info = block_group->fs_info; in btrfs_zone_activate() 1877 struct btrfs_space_info *space_info = block_group->space_info; in btrfs_zone_activate() 1884 if (!btrfs_is_zoned(block_group->fs_info)) in btrfs_zone_activate() 1887 map = block_group->physical_map; in btrfs_zone_activate() 1890 spin_lock(&block_group->lock); in btrfs_zone_activate() 1891 if (test_bit(BLOCK_GROUP_FLAG_ZONE_IS_ACTIVE, &block_group->runtime_flags)) { in btrfs_zone_activate() 1897 if (btrfs_zoned_bg_is_full(block_group)) { in btrfs_zone_activate() 1917 set_bit(BLOCK_GROUP_FLAG_ZONE_IS_ACTIVE, &block_group->runtime_flags); in btrfs_zone_activate() 1918 space_info->active_total_bytes += block_group->length; in btrfs_zone_activate() [all …]
|
D | block-group.h | 72 struct btrfs_block_group *block_group; member 237 static inline u64 btrfs_block_group_end(struct btrfs_block_group *block_group) in btrfs_block_group_end() argument 239 return (block_group->start + block_group->length); in btrfs_block_group_end() 243 struct btrfs_block_group *block_group) in btrfs_is_block_group_data_only() argument 249 return (block_group->flags & BTRFS_BLOCK_GROUP_DATA) && in btrfs_is_block_group_data_only() 250 !(block_group->flags & BTRFS_BLOCK_GROUP_METADATA); in btrfs_is_block_group_data_only() 255 struct btrfs_block_group *block_group) in btrfs_should_fragment_free_space() argument 257 struct btrfs_fs_info *fs_info = block_group->fs_info; in btrfs_should_fragment_free_space() 260 block_group->flags & BTRFS_BLOCK_GROUP_METADATA) || in btrfs_should_fragment_free_space() 262 block_group->flags & BTRFS_BLOCK_GROUP_DATA); in btrfs_should_fragment_free_space() [all …]
|
D | discard.h | 18 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); 31 void btrfs_discard_update_discardable(struct btrfs_block_group *block_group);
|
D | extent-tree.c | 2583 struct btrfs_block_group *block_group; in __exclude_logged_extent() local 2585 block_group = btrfs_lookup_block_group(fs_info, start); in __exclude_logged_extent() 2586 if (!block_group) in __exclude_logged_extent() 2589 ret = btrfs_cache_block_group(block_group, true); in __exclude_logged_extent() 2593 ret = btrfs_remove_free_space(block_group, start, num_bytes); in __exclude_logged_extent() 2595 btrfs_put_block_group(block_group); in __exclude_logged_extent() 2762 struct btrfs_block_group *block_group, *tmp; in btrfs_finish_extent_commit() local 2804 list_for_each_entry_safe(block_group, tmp, deleted_bgs, bg_list) { in btrfs_finish_extent_commit() 2810 block_group->start, in btrfs_finish_extent_commit() 2811 block_group->length, in btrfs_finish_extent_commit() [all …]
|
D | space-info.c | 297 struct btrfs_block_group *block_group) in btrfs_add_bg_to_space_info() argument 302 factor = btrfs_bg_type_to_factor(block_group->flags); in btrfs_add_bg_to_space_info() 304 found = btrfs_find_space_info(info, block_group->flags); in btrfs_add_bg_to_space_info() 307 found->total_bytes += block_group->length; in btrfs_add_bg_to_space_info() 308 if (test_bit(BLOCK_GROUP_FLAG_ZONE_IS_ACTIVE, &block_group->runtime_flags)) in btrfs_add_bg_to_space_info() 309 found->active_total_bytes += block_group->length; in btrfs_add_bg_to_space_info() 310 found->disk_total += block_group->length * factor; in btrfs_add_bg_to_space_info() 311 found->bytes_used += block_group->used; in btrfs_add_bg_to_space_info() 312 found->disk_used += block_group->used * factor; in btrfs_add_bg_to_space_info() 313 found->bytes_readonly += block_group->bytes_super; in btrfs_add_bg_to_space_info() [all …]
|
D | zoned.h | 72 bool btrfs_zone_activate(struct btrfs_block_group *block_group); 73 int btrfs_zone_finish(struct btrfs_block_group *block_group); 233 static inline bool btrfs_zone_activate(struct btrfs_block_group *block_group) in btrfs_zone_activate() argument 238 static inline int btrfs_zone_finish(struct btrfs_block_group *block_group) in btrfs_zone_finish() argument
|
D | relocation.c | 120 struct btrfs_block_group *block_group; member 165 in_range(node->bytenr, rc->block_group->start, in mark_block_processed() 166 rc->block_group->length)) { in mark_block_processed() 1099 if (!in_range(bytenr, rc->block_group->start, in replace_file_extents() 1100 rc->block_group->length)) in replace_file_extents() 1354 rc->block_group, parent, slot, in replace_path() 3304 struct btrfs_block_group *block_group, in delete_block_group_cache() argument 3331 ret = btrfs_truncate_free_space_cache(trans, block_group, inode); in delete_block_group_cache() 3345 struct btrfs_block_group *block_group, in delete_v1_space_cache() argument 3377 ret = delete_block_group_cache(leaf->fs_info, block_group, NULL, in delete_v1_space_cache() [all …]
|
D | space-info.h | 127 struct btrfs_block_group *block_group);
|
/linux-6.1.9/fs/ext4/ |
D | balloc.c | 27 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() 87 ext4_group_t block_group, in ext4_num_overhead_clusters() argument 92 ext4_fsblk_t start = ext4_group_first_block_no(sb, block_group); in ext4_num_overhead_clusters() 99 num_clusters = ext4_num_base_meta_clusters(sb, block_group); in ext4_num_overhead_clusters() 113 if (ext4_block_in_group(sb, ext4_block_bitmap(sb, gdp), block_group)) { in ext4_num_overhead_clusters() 124 if (ext4_block_in_group(sb, ext4_inode_bitmap(sb, gdp), block_group)) { in ext4_num_overhead_clusters() 137 if (ext4_block_in_group(sb, itbl_blk + i, block_group)) { in ext4_num_overhead_clusters() 160 ext4_group_t block_group) in num_clusters_in_group() argument [all …]
|
D | ialloc.c | 81 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() 101 if (!ext4_inode_bitmap_csum_verify(sb, block_group, desc, bh, 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() [all …]
|
D | mballoc.c | 3585 ext4_group_t block_group, ext4_grpblk_t cluster, int count, in ext4_issue_discard() argument 3591 ext4_group_first_block_no(sb, block_group)); in ext4_issue_discard() 5897 ext4_group_t block_group; in ext4_mb_clear_bb() local 5917 ext4_get_group_no_and_offset(sb, block, &block_group, &bit); in ext4_mb_clear_bb() 5920 ext4_get_group_info(sb, block_group)))) in ext4_mb_clear_bb() 5935 bitmap_bh = ext4_read_block_bitmap(sb, block_group); in ext4_mb_clear_bb() 5941 gdp = ext4_get_group_desc(sb, block_group, &gd_bh); in ext4_mb_clear_bb() 5977 trace_ext4_mballoc_free(sb, inode, block_group, bit, count_clusters); in ext4_mb_clear_bb() 5980 err = ext4_mb_load_buddy_gfp(sb, block_group, &e4b, in ext4_mb_clear_bb() 6002 new_entry->efd_group = block_group; in ext4_mb_clear_bb() [all …]
|
D | ext4.h | 2513 ext4_group_t block_group; member 2716 ext4_group_t block_group, 2721 ext4_group_t block_group, 2724 ext4_group_t block_group, 2727 ext4_group_t block_group); 2729 ext4_group_t block_group, 3091 ext4_group_t block_group, 3351 ext4_group_t block_group) in ext4_flex_group() argument 3353 return block_group >> sbi->s_log_groups_per_flex; in ext4_flex_group()
|
/linux-6.1.9/fs/udf/ |
D | balloc.c | 55 unsigned int block_group) in __load_block_bitmap() argument 60 if (block_group >= nr_groups) { in __load_block_bitmap() 62 block_group, nr_groups); in __load_block_bitmap() 65 if (bitmap->s_block_bitmap[block_group]) in __load_block_bitmap() 66 return block_group; in __load_block_bitmap() 68 retval = read_block_bitmap(sb, bitmap, block_group, block_group); in __load_block_bitmap() 72 return block_group; in __load_block_bitmap() 77 unsigned int block_group) in load_block_bitmap() argument 81 slot = __load_block_bitmap(sb, bitmap, block_group); in load_block_bitmap() 115 unsigned long block_group; in udf_bitmap_free_blocks() local [all …]
|
/linux-6.1.9/fs/ext2/ |
D | balloc.c | 42 unsigned int block_group, in ext2_get_group_desc() argument 50 if (block_group >= sbi->s_groups_count) { in ext2_get_group_desc() 53 block_group, sbi->s_groups_count); in ext2_get_group_desc() 58 group_desc = block_group >> EXT2_DESC_PER_BLOCK_BITS(sb); in ext2_get_group_desc() 59 offset = block_group & (EXT2_DESC_PER_BLOCK(sb) - 1); in ext2_get_group_desc() 63 block_group, group_desc, offset); in ext2_get_group_desc() 75 unsigned int block_group, in ext2_valid_block_bitmap() argument 83 group_first_block = ext2_group_first_block_no(sb, block_group); in ext2_valid_block_bitmap() 113 block_group, bitmap_blk); in ext2_valid_block_bitmap() 124 read_block_bitmap(struct super_block *sb, unsigned int block_group) in read_block_bitmap() argument [all …]
|
D | ialloc.c | 47 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 …]
|
D | ext2.h | 125 sb_bgl_lock(struct ext2_sb_info *sbi, unsigned int block_group) in sb_bgl_lock() argument 127 return bgl_lock_ptr(sbi->s_blockgroup_lock, block_group); in sb_bgl_lock() 719 unsigned int block_group,
|
/linux-6.1.9/include/linux/ |
D | blockgroup_lock.h | 36 bgl_lock_ptr(struct blockgroup_lock *bgl, unsigned int block_group) in bgl_lock_ptr() argument 38 return &bgl->locks[block_group & (NR_BG_LOCKS-1)].lock; in bgl_lock_ptr()
|
/linux-6.1.9/include/trace/events/ |
D | btrfs.h | 801 const struct btrfs_block_group *block_group, int create), 803 TP_ARGS(fs_info, block_group, create), 815 __entry->offset = block_group->start; 816 __entry->size = block_group->length; 817 __entry->flags = block_group->flags; 818 __entry->bytes_used = block_group->used; 819 __entry->bytes_super = block_group->bytes_super; 1272 TP_PROTO(const struct btrfs_block_group *block_group, u64 start, 1275 TP_ARGS(block_group, start, len), 1284 TP_fast_assign_btrfs(block_group->fs_info, [all …]
|
/linux-6.1.9/fs/nilfs2/ |
D | mdt.h | 110 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()
|