/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 84 if (list_empty(&block_group->discard_list) || in __add_to_discard_list() 85 block_group->discard_index == BTRFS_DISCARD_INDEX_UNUSED) { in __add_to_discard_list() 86 if (block_group->discard_index == BTRFS_DISCARD_INDEX_UNUSED) in __add_to_discard_list() 87 block_group->discard_index = BTRFS_DISCARD_INDEX_START; in __add_to_discard_list() 88 block_group->discard_eligible_time = (ktime_get_ns() + in __add_to_discard_list() 90 block_group->discard_state = BTRFS_DISCARD_RESET_CURSOR; in __add_to_discard_list() 92 if (list_empty(&block_group->discard_list)) in __add_to_discard_list() [all …]
|
D | free-space-cache.c | 100 struct inode *lookup_free_space_inode(struct btrfs_block_group *block_group, in lookup_free_space_inode() argument 103 struct btrfs_fs_info *fs_info = block_group->fs_info; in lookup_free_space_inode() 107 spin_lock(&block_group->lock); in lookup_free_space_inode() 108 if (block_group->inode) in lookup_free_space_inode() 109 inode = igrab(block_group->inode); in lookup_free_space_inode() 110 spin_unlock(&block_group->lock); in lookup_free_space_inode() 115 block_group->start); in lookup_free_space_inode() 119 spin_lock(&block_group->lock); in lookup_free_space_inode() 124 block_group->disk_cache_state = BTRFS_DC_CLEAR; in lookup_free_space_inode() 127 if (!block_group->iref) { in lookup_free_space_inode() [all …]
|
D | free-space-tree.c | 16 struct btrfs_block_group *block_group, 51 struct btrfs_block_group *block_group, in add_new_free_space_info() argument 60 key.objectid = block_group->start; in add_new_free_space_info() 62 key.offset = block_group->length; in add_new_free_space_info() 84 struct btrfs_block_group *block_group, in search_free_space_info() argument 87 struct btrfs_fs_info *fs_info = block_group->fs_info; in search_free_space_info() 92 key.objectid = block_group->start; in search_free_space_info() 94 key.offset = block_group->length; in search_free_space_info() 101 block_group->start); in search_free_space_info() 187 struct btrfs_block_group *block_group, in convert_free_space_to_bitmaps() argument [all …]
|
D | block-group.c | 171 struct btrfs_block_group *block_group) in btrfs_add_block_group_cache() argument 177 ASSERT(block_group->length != 0); in btrfs_add_block_group_cache() 185 if (block_group->start < cache->start) { in btrfs_add_block_group_cache() 187 } else if (block_group->start > cache->start) { in btrfs_add_block_group_cache() 195 rb_link_node(&block_group->cache_node, parent, p); in btrfs_add_block_group_cache() 196 rb_insert_color(&block_group->cache_node, in btrfs_add_block_group_cache() 199 if (info->first_logical_byte > block_group->start) in btrfs_add_block_group_cache() 200 info->first_logical_byte = block_group->start; in btrfs_add_block_group_cache() 449 static void fragment_free_space(struct btrfs_block_group *block_group) in fragment_free_space() argument 451 struct btrfs_fs_info *fs_info = block_group->fs_info; in fragment_free_space() [all …]
|
D | free-space-cache.h | 80 struct inode *lookup_free_space_inode(struct btrfs_block_group *block_group, 83 struct btrfs_block_group *block_group, 87 struct btrfs_block_group *block_group); 92 struct btrfs_block_group *block_group, 94 int load_free_space_cache(struct btrfs_block_group *block_group); 96 struct btrfs_block_group *block_group, 99 struct btrfs_block_group *block_group, 102 void btrfs_init_free_space_ctl(struct btrfs_block_group *block_group, 108 int btrfs_add_free_space(struct btrfs_block_group *block_group, 110 int btrfs_add_free_space_unused(struct btrfs_block_group *block_group, [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 | block-group.h | 50 struct btrfs_block_group *block_group; member 209 static inline u64 btrfs_block_group_end(struct btrfs_block_group *block_group) in btrfs_block_group_end() argument 211 return (block_group->start + block_group->length); in btrfs_block_group_end() 215 struct btrfs_block_group *block_group) in btrfs_is_block_group_data_only() argument 221 return (block_group->flags & BTRFS_BLOCK_GROUP_DATA) && in btrfs_is_block_group_data_only() 222 !(block_group->flags & BTRFS_BLOCK_GROUP_METADATA); in btrfs_is_block_group_data_only() 227 struct btrfs_block_group *block_group) in btrfs_should_fragment_free_space() argument 229 struct btrfs_fs_info *fs_info = block_group->fs_info; in btrfs_should_fragment_free_space() 232 block_group->flags & BTRFS_BLOCK_GROUP_METADATA) || in btrfs_should_fragment_free_space() 234 block_group->flags & BTRFS_BLOCK_GROUP_DATA); in btrfs_should_fragment_free_space() [all …]
|
D | extent-tree.c | 2604 struct btrfs_block_group *block_group; in __exclude_logged_extent() local 2606 block_group = btrfs_lookup_block_group(fs_info, start); in __exclude_logged_extent() 2607 if (!block_group) in __exclude_logged_extent() 2610 ret = btrfs_cache_block_group(block_group, true); in __exclude_logged_extent() 2614 ret = btrfs_remove_free_space(block_group, start, num_bytes); in __exclude_logged_extent() 2616 btrfs_put_block_group(block_group); in __exclude_logged_extent() 2789 struct btrfs_block_group *block_group, *tmp; in btrfs_finish_extent_commit() local 2831 list_for_each_entry_safe(block_group, tmp, deleted_bgs, bg_list) { in btrfs_finish_extent_commit() 2837 block_group->start, in btrfs_finish_extent_commit() 2838 block_group->length, in btrfs_finish_extent_commit() [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 | relocation.c | 118 struct btrfs_block_group *block_group; member 163 in_range(node->bytenr, rc->block_group->start, in mark_block_processed() 164 rc->block_group->length)) { in mark_block_processed() 1097 if (!in_range(bytenr, rc->block_group->start, in replace_file_extents() 1098 rc->block_group->length)) in replace_file_extents() 1354 rc->block_group, parent, slot, in replace_path() 3344 struct btrfs_block_group *block_group, in delete_block_group_cache() argument 3371 ret = btrfs_truncate_free_space_cache(trans, block_group, inode); in delete_block_group_cache() 3385 struct btrfs_block_group *block_group, in delete_v1_space_cache() argument 3417 ret = delete_block_group_cache(leaf->fs_info, block_group, NULL, in delete_v1_space_cache() [all …]
|
D | zoned.c | 1660 struct btrfs_block_group *block_group; in btrfs_zoned_release_data_reloc_bg() local 1665 block_group = btrfs_lookup_block_group(fs_info, logical); in btrfs_zoned_release_data_reloc_bg() 1667 ASSERT(block_group && (block_group->flags & BTRFS_BLOCK_GROUP_DATA)); in btrfs_zoned_release_data_reloc_bg() 1669 spin_lock(&block_group->lock); in btrfs_zoned_release_data_reloc_bg() 1670 if (!block_group->zoned_data_reloc_ongoing) in btrfs_zoned_release_data_reloc_bg() 1674 if (block_group->start + block_group->alloc_offset == logical + length) { in btrfs_zoned_release_data_reloc_bg() 1676 block_group->zoned_data_reloc_ongoing = 0; in btrfs_zoned_release_data_reloc_bg() 1680 spin_unlock(&block_group->lock); in btrfs_zoned_release_data_reloc_bg() 1681 btrfs_put_block_group(block_group); in btrfs_zoned_release_data_reloc_bg()
|
D | volumes.c | 3269 struct btrfs_block_group *block_group; in btrfs_relocate_chunk() local 3294 block_group = btrfs_lookup_block_group(fs_info, chunk_offset); in btrfs_relocate_chunk() 3295 if (!block_group) in btrfs_relocate_chunk() 3297 btrfs_discard_cancel_work(&fs_info->discard_ctl, block_group); in btrfs_relocate_chunk() 3298 length = block_group->length; in btrfs_relocate_chunk() 3299 btrfs_put_block_group(block_group); in btrfs_relocate_chunk() 5403 struct btrfs_block_group *block_group; in create_chunk() local 5455 block_group = btrfs_make_block_group(trans, 0, type, start, ctl->chunk_size); in create_chunk() 5456 if (IS_ERR(block_group)) in create_chunk() 5476 return block_group; in create_chunk() [all …]
|
D | sysfs.c | 667 struct btrfs_block_group *block_group; in raid_bytes_show() local 672 list_for_each_entry(block_group, &sinfo->block_groups[index], list) { in raid_bytes_show() 674 val += block_group->length; in raid_bytes_show() 676 val += block_group->used; in raid_bytes_show()
|
D | transaction.c | 221 struct btrfs_block_group *cache = caching_ctl->block_group; in switch_commit_roots() 2078 struct btrfs_block_group *block_group, *tmp; in btrfs_cleanup_pending_block_groups() local 2080 list_for_each_entry_safe(block_group, tmp, &trans->new_bgs, bg_list) { in btrfs_cleanup_pending_block_groups() 2082 list_del_init(&block_group->bg_list); in btrfs_cleanup_pending_block_groups()
|
D | ioctl.c | 3535 struct btrfs_block_group *block_group; in get_block_group_info() local 3540 list_for_each_entry(block_group, groups_list, list) { in get_block_group_info() 3541 space->flags = block_group->flags; in get_block_group_info() 3542 space->total_bytes += block_group->length; in get_block_group_info() 3543 space->used_bytes += block_group->used; in get_block_group_info()
|
/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 | 3647 ext4_group_t block_group, ext4_grpblk_t cluster, int count, in ext4_issue_discard() argument 3653 ext4_group_first_block_no(sb, block_group)); in ext4_issue_discard() 5970 ext4_group_t block_group; in ext4_mb_clear_bb() local 5990 ext4_get_group_no_and_offset(sb, block, &block_group, &bit); in ext4_mb_clear_bb() 5992 grp = ext4_get_group_info(sb, block_group); in ext4_mb_clear_bb() 6008 bitmap_bh = ext4_read_block_bitmap(sb, block_group); in ext4_mb_clear_bb() 6014 gdp = ext4_get_group_desc(sb, block_group, &gd_bh); in ext4_mb_clear_bb() 6050 trace_ext4_mballoc_free(sb, inode, block_group, bit, count_clusters); in ext4_mb_clear_bb() 6053 err = ext4_mb_load_buddy_gfp(sb, block_group, &e4b, in ext4_mb_clear_bb() 6075 new_entry->efd_group = block_group; in ext4_mb_clear_bb() [all …]
|
D | ext4.h | 2499 ext4_group_t block_group; member 2702 ext4_group_t block_group, 2709 ext4_group_t block_group, 2712 ext4_group_t block_group, 2715 ext4_group_t block_group); 2717 ext4_group_t block_group, 3121 ext4_group_t block_group, 3124 ext4_group_t block_group); 3370 ext4_group_t block_group) in ext4_flex_group() argument 3372 return block_group >> sbi->s_log_groups_per_flex; in ext4_flex_group()
|
/fs/udf/ |
D | balloc.c | 78 unsigned int block_group) in __load_block_bitmap() argument 83 if (block_group >= nr_groups) { in __load_block_bitmap() 85 block_group, nr_groups); in __load_block_bitmap() 88 if (bitmap->s_block_bitmap[block_group]) in __load_block_bitmap() 89 return block_group; in __load_block_bitmap() 91 retval = read_block_bitmap(sb, bitmap, block_group, block_group); in __load_block_bitmap() 95 return block_group; in __load_block_bitmap() 100 unsigned int block_group) in load_block_bitmap() argument 104 slot = __load_block_bitmap(sb, bitmap, block_group); in load_block_bitmap() 138 unsigned long block_group; in udf_bitmap_free_blocks() local [all …]
|
/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 179 block_group = (inode->i_ino - 1) / EXT2_INODES_PER_GROUP(inode->i_sb); in ext2_preread_inode() [all …]
|
D | ext2.h | 121 sb_bgl_lock(struct ext2_sb_info *sbi, unsigned int block_group) in sb_bgl_lock() argument 123 return bgl_lock_ptr(sbi->s_blockgroup_lock, block_group); in sb_bgl_lock() 707 unsigned int block_group,
|
D | inode.c | 1332 unsigned long block_group; in ext2_get_inode() local 1342 block_group = (ino - 1) / EXT2_INODES_PER_GROUP(sb); in ext2_get_inode() 1343 gdp = ext2_get_group_desc(sb, block_group, NULL); in ext2_get_inode()
|
/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()
|