Lines Matching refs:group
110 ext4_group_t group) { in ext4_meta_bg_first_group() argument
111 return (group >> EXT4_DESC_PER_BLOCK_BITS(sb)) << in ext4_meta_bg_first_group()
116 ext4_group_t group) { in ext4_meta_bg_first_block_no() argument
117 group = ext4_meta_bg_first_group(sb, group); in ext4_meta_bg_first_block_no()
118 return ext4_group_first_block_no(sb, group); in ext4_meta_bg_first_block_no()
122 ext4_group_t group) { in ext4_group_overhead_blocks() argument
124 overhead = ext4_bg_num_gdb(sb, group); in ext4_group_overhead_blocks()
125 if (ext4_bg_has_super(sb, group)) in ext4_group_overhead_blocks()
141 ext4_group_t group = input->group; in verify_group_input() local
149 if (group != sbi->s_groups_count) { in verify_group_input()
151 input->group, sbi->s_groups_count); in verify_group_input()
155 overhead = ext4_group_overhead_blocks(sb, group); in verify_group_input()
163 ext4_bg_has_super(sb, input->group) ? "normal" : in verify_group_input()
164 "no-super", input->group, input->blocks_count, in verify_group_input()
316 ext4_group_t group; in ext4_alloc_group_tables() local
324 src_group = group_data[0].group; in ext4_alloc_group_tables()
330 group = group_data[0].group; in ext4_alloc_group_tables()
331 if (src_group >= group_data[0].group + flex_gd->count) in ext4_alloc_group_tables()
334 last_blk = start_blk + group_data[src_group - group].blocks_count; in ext4_alloc_group_tables()
345 last_blk += group_data[src_group - group].blocks_count; in ext4_alloc_group_tables()
355 group = ext4_get_group_number(sb, start_blk - 1); in ext4_alloc_group_tables()
356 group -= group_data[0].group; in ext4_alloc_group_tables()
357 group_data[group].mdata_blocks++; in ext4_alloc_group_tables()
358 flex_gd->bg_flags[group] &= uninit_mask; in ext4_alloc_group_tables()
366 group = ext4_get_group_number(sb, start_blk - 1); in ext4_alloc_group_tables()
367 group -= group_data[0].group; in ext4_alloc_group_tables()
368 group_data[group].mdata_blocks++; in ext4_alloc_group_tables()
369 flex_gd->bg_flags[group] &= uninit_mask; in ext4_alloc_group_tables()
380 group = ext4_get_group_number(sb, start_blk); in ext4_alloc_group_tables()
381 next_group_start = ext4_group_first_block_no(sb, group + 1); in ext4_alloc_group_tables()
382 group -= group_data[0].group; in ext4_alloc_group_tables()
385 flex_gd->bg_flags[group + 1] &= uninit_mask; in ext4_alloc_group_tables()
387 group_data[group + 1].mdata_blocks += overhead; in ext4_alloc_group_tables()
391 group_data[group].mdata_blocks += itb; in ext4_alloc_group_tables()
392 flex_gd->bg_flags[group] &= uninit_mask; in ext4_alloc_group_tables()
405 group = group_data[0].group; in ext4_alloc_group_tables()
414 ext4_bg_has_super(sb, group + i) ? "normal" : in ext4_alloc_group_tables()
415 "no-super", group + i, in ext4_alloc_group_tables()
475 ext4_group_t group; in set_flexbg_block_bitmap() local
478 group = ext4_get_group_number(sb, EXT4_C2B(sbi, first_cluster)); in set_flexbg_block_bitmap()
479 start = EXT4_B2C(sbi, ext4_group_first_block_no(sb, group)); in set_flexbg_block_bitmap()
480 group -= flex_gd->groups[0].group; in set_flexbg_block_bitmap()
486 if (flex_gd->bg_flags[group] & EXT4_BG_BLOCK_UNINIT) { in set_flexbg_block_bitmap()
495 bh = sb_getblk(sb, flex_gd->groups[group].block_bitmap); in set_flexbg_block_bitmap()
544 ext4_group_t group, count; in setup_new_flex_group_blocks() local
550 group_data[0].group != sbi->s_groups_count); in setup_new_flex_group_blocks()
560 group = group_data[0].group; in setup_new_flex_group_blocks()
561 for (i = 0; i < flex_gd->count; i++, group++) { in setup_new_flex_group_blocks()
565 gdblocks = ext4_bg_num_gdb(sb, group); in setup_new_flex_group_blocks()
566 start = ext4_group_first_block_no(sb, group); in setup_new_flex_group_blocks()
568 if (meta_bg == 0 && !ext4_bg_has_super(sb, group)) in setup_new_flex_group_blocks()
574 block = start + ext4_bg_has_super(sb, group); in setup_new_flex_group_blocks()
612 if (ext4_bg_has_super(sb, group)) { in setup_new_flex_group_blocks()
648 overhead = ext4_group_overhead_blocks(sb, group); in setup_new_flex_group_blocks()
825 ext4_group_t group) in add_new_gdb() argument
829 unsigned long gdb_num = group / EXT4_DESC_PER_BLOCK(sb); in add_new_gdb()
848 gdbackups = verify_reserved_gdb(sb, group, gdb_bh); in add_new_gdb()
865 group, gdblock); in add_new_gdb()
961 handle_t *handle, ext4_group_t group) { in add_new_gdb_meta_bg() argument
965 unsigned long gdb_num = group / EXT4_DESC_PER_BLOCK(sb); in add_new_gdb_meta_bg()
968 gdblock = ext4_meta_bg_first_block_no(sb, group) + in add_new_gdb_meta_bg()
969 ext4_bg_has_super(sb, group); in add_new_gdb_meta_bg()
1018 ext4_group_t group) in reserve_backup_gdb() argument
1065 gdbackups = verify_reserved_gdb(sb, group, primary[res]); in reserve_backup_gdb()
1089 blk = group * EXT4_BLOCKS_PER_GROUP(sb); in reserve_backup_gdb()
1117 ext4_group_t group) in ext4_set_block_group_nr() argument
1121 es->s_block_group_nr = cpu_to_le16(group); in ext4_set_block_group_nr()
1151 ext4_group_t group = 0; in update_backups() local
1158 group = 1; in update_backups()
1164 group = ext4_list_backups(sb, &three, &five, &seven); in update_backups()
1167 group = ext4_get_group_number(sb, blk_off) + 1; in update_backups()
1168 last = (ext4_group_t)(group + EXT4_DESC_PER_BLOCK(sb) - 2); in update_backups()
1171 while (group < sbi->s_groups_count) { in update_backups()
1174 int has_super = ext4_bg_has_super(sb, group); in update_backups()
1175 ext4_fsblk_t first_block = ext4_group_first_block_no(sb, group); in update_backups()
1183 backup_block = ((ext4_fsblk_t)group) * bpg + blk_off; in update_backups()
1194 ext4_group_first_block_no(sb, group)); in update_backups()
1206 ext4_set_block_group_nr(sb, bh->b_data, group); in update_backups()
1215 group = ext4_list_backups(sb, &three, &five, &seven); in update_backups()
1216 else if (group == last) in update_backups()
1219 group = last; in update_backups()
1237 "forcing fsck on next reboot", group, err); in update_backups()
1255 ext4_group_t group, struct inode *resize_inode, in ext4_add_new_descs() argument
1265 for (i = 0; i < count; i++, group++) { in ext4_add_new_descs()
1266 int reserved_gdb = ext4_bg_has_super(sb, group) ? in ext4_add_new_descs()
1269 gdb_off = group % EXT4_DESC_PER_BLOCK(sb); in ext4_add_new_descs()
1270 gdb_num = group / EXT4_DESC_PER_BLOCK(sb); in ext4_add_new_descs()
1285 if (!err && reserved_gdb && ext4_bg_num_gdb(sb, group)) in ext4_add_new_descs()
1286 err = reserve_backup_gdb(handle, resize_inode, group); in ext4_add_new_descs()
1288 err = add_new_gdb_meta_bg(sb, handle, group); in ext4_add_new_descs()
1290 err = add_new_gdb(handle, resize_inode, group); in ext4_add_new_descs()
1348 ext4_group_t group; in ext4_setup_new_descs() local
1354 group = group_data->group; in ext4_setup_new_descs()
1356 gdb_off = group % EXT4_DESC_PER_BLOCK(sb); in ext4_setup_new_descs()
1357 gdb_num = group / EXT4_DESC_PER_BLOCK(sb); in ext4_setup_new_descs()
1384 ext4_group_desc_csum_set(sb, group, gdp); in ext4_setup_new_descs()
1396 err = ext4_mb_add_groupinfo(sb, group, gdp); in ext4_setup_new_descs()
1504 flex_group = ext4_flex_group(sbi, group_data[0].group); in ext4_update_super()
1546 ext4_group_t group; in ext4_flex_group_add() local
1555 ext4_get_group_no_and_offset(sb, o_blocks_count, &group, &last); in ext4_flex_group_add()
1584 group = flex_gd->groups[0].group; in ext4_flex_group_add()
1585 BUG_ON(group != sbi->s_groups_count); in ext4_flex_group_add()
1586 err = ext4_add_new_descs(handle, sb, group, in ext4_flex_group_add()
1605 int gdb_num = group / EXT4_DESC_PER_BLOCK(sb); in ext4_flex_group_add()
1606 int gdb_num_end = ((group + flex_gd->count - 1) / in ext4_flex_group_add()
1641 ext4_group_t group; in ext4_setup_next_flex_gd() local
1654 ext4_get_group_no_and_offset(sb, o_blocks_count, &group, &last); in ext4_setup_next_flex_gd()
1658 last_group = group | (flex_gd->resize_bg - 1); in ext4_setup_next_flex_gd()
1662 flex_gd->count = last_group - group + 1; in ext4_setup_next_flex_gd()
1667 group_data[i].group = group + i; in ext4_setup_next_flex_gd()
1669 overhead = ext4_group_overhead_blocks(sb, group + i); in ext4_setup_next_flex_gd()
1712 int reserved_gdb = ext4_bg_has_super(sb, input->group) ? in ext4_group_add()
1719 gdb_off = input->group % EXT4_DESC_PER_BLOCK(sb); in ext4_group_add()
1757 err = ext4_alloc_flex_bg_array(sb, input->group + 1); in ext4_group_add()
1761 err = ext4_mb_alloc_groupinfo(sb, input->group + 1); in ext4_group_add()
1848 ext4_group_t group; in ext4_group_extend() local
1873 ext4_get_group_no_and_offset(sb, o_blocks_count, &group, &last); in ext4_group_extend()