Lines Matching refs:group
42 * blocks groups. Each group contains 1 bitmap block for blocks, 1 bitmap
45 * The file system contains group descriptors which are located after the
371 * for a particular block group or flex_bg. If flex_size is 1, then g
372 * is a block group number; otherwise it is flex_bg number.
407 * Otherwise we simply return a random group.
411 * It's OK to put directory into a group unless
415 * Parent's group is preferred, if it doesn't satisfy these
417 * of the groups look good we just look for a group with more
418 * free inodes than average (starting at parent's group).
422 ext4_group_t *group, umode_t mode,
487 *group = grp;
495 * start at 2nd block group of the flexgroup. See
504 *group = grp+i;
518 * Start looking in the flex group where we last allocated an
550 *group = grp;
569 ext4_group_t *group, umode_t mode)
577 * Try to place the inode is the same flex group as its
579 * find another flex group, and store that information in the
581 * group for future allocations.
594 *group = i;
605 * to find a new flex group; we pass in the mode to
608 *group = parent_group + flex_size;
609 if (*group > ngroups)
610 *group = 0;
611 return find_group_orlov(sb, parent, group, mode, NULL);
617 *group = parent_group;
618 desc = ext4_get_group_desc(sb, *group, NULL);
632 *group = (*group + parent->i_ino) % ngroups;
635 * Use a quadratic hash to find a group with a free inode and some free
639 *group += i;
640 if (*group >= ngroups)
641 *group -= ngroups;
642 desc = ext4_get_group_desc(sb, *group, NULL);
649 * That failed: try linear search for a free inode, even if that group
652 *group = parent_group;
654 if (++*group >= ngroups)
655 *group = 0;
656 desc = ext4_get_group_desc(sb, *group, NULL);
673 static int recently_deleted(struct super_block *sb, ext4_group_t group, int ino)
683 gdp = ext4_get_group_desc(sb, group, NULL);
716 static int find_inode_bit(struct super_block *sb, ext4_group_t group,
729 if (check_recently_deleted && recently_deleted(sb, group, *ino)) {
755 ext4_group_t group;
762 group = (ino - 1) / EXT4_INODES_PER_GROUP(sb);
764 inode_bitmap_bh = ext4_read_inode_bitmap(sb, group);
773 gdp = ext4_get_group_desc(sb, group, &group_desc_bh);
798 block_bitmap_bh = ext4_read_block_bitmap(sb, group);
809 ext4_lock_group(sb, group);
814 ext4_free_clusters_after_init(sb, group, gdp));
815 ext4_block_bitmap_csum_set(sb, group, gdp,
817 ext4_group_desc_csum_set(sb, group, gdp);
819 ext4_unlock_group(sb, group);
832 ext4_lock_group(sb, group); /* while we modify the bg desc */
842 * relative inode number in this group. if it is greater
849 ext4_lock_group(sb, group);
854 ext4_inode_bitmap_csum_set(sb, group, gdp, inode_bitmap_bh,
856 ext4_group_desc_csum_set(sb, group, gdp);
859 ext4_unlock_group(sb, group);
915 * a directory, then a forward search is made for a block group with both
917 * the groups with above-average free space, that group with the fewest
921 * group to find a free inode.
932 ext4_group_t ngroups, group = 0;
1007 group = (goal - 1) / EXT4_INODES_PER_GROUP(sb);
1014 ret2 = find_group_orlov(sb, dir, &group, mode, qstr);
1016 ret2 = find_group_other(sb, dir, &group, mode);
1019 EXT4_I(dir)->i_last_alloc_group = group;
1026 * unless we get unlucky and it turns out the group we selected
1032 gdp = ext4_get_group_desc(sb, group, &group_desc_bh);
1043 grp = ext4_get_group_info(sb, group);
1053 inode_bitmap_bh = ext4_read_inode_bitmap(sb, group);
1063 ret2 = find_inode_bit(sb, group, inode_bitmap_bh, &ino);
1067 if (group == 0 && (ino + 1) < EXT4_FIRST_INO(sb)) {
1070 ext4_mark_group_bitmap_corrupted(sb, group,
1092 ext4_lock_group(sb, group);
1098 ret2 = find_inode_bit(sb, group, inode_bitmap_bh, &ino);
1106 ext4_unlock_group(sb, group);
1114 if (++group == ngroups)
1115 group = 0;
1140 block_bitmap_bh = ext4_read_block_bitmap(sb, group);
1157 ext4_lock_group(sb, group);
1162 ext4_free_clusters_after_init(sb, group, gdp));
1163 ext4_block_bitmap_csum_set(sb, group, gdp,
1165 ext4_group_desc_csum_set(sb, group, gdp);
1167 ext4_unlock_group(sb, group);
1182 grp = ext4_get_group_info(sb, group);
1192 ext4_lock_group(sb, group); /* while we modify the bg desc */
1201 * relative inode number in this group. if it is greater
1210 ext4_lock_group(sb, group);
1217 ext4_group_t f = ext4_flex_group(sbi, group);
1224 ext4_inode_bitmap_csum_set(sb, group, gdp, inode_bitmap_bh,
1226 ext4_group_desc_csum_set(sb, group, gdp);
1228 ext4_unlock_group(sb, group);
1242 flex_group = ext4_flex_group(sbi, group);
1247 inode->i_ino = ino + group * EXT4_INODES_PER_GROUP(sb);
1263 ei->i_block_group = group;
1277 ext4_mark_group_bitmap_corrupted(sb, group,
1466 printk(KERN_DEBUG "group %lu: stored = %d, counted = %lu\n",
1508 * inode allocation from the current group, so we take alloc_sem lock, to
1511 int ext4_init_inode_table(struct super_block *sb, ext4_group_t group,
1514 struct ext4_group_info *grp = ext4_get_group_info(sb, group);
1529 gdp = ext4_get_group_desc(sb, group, &group_desc_bh);
1559 ext4_error(sb, "Something is wrong with group %u: "
1562 group, used_blks,
1568 used_inos += group * EXT4_INODES_PER_GROUP(sb);
1575 ext4_error(sb, "Something is wrong with group %u: "
1578 group, ext4_itable_unused_count(sb, gdp),
1602 ext4_debug("going to zero out inode table in group %d\n",
1603 group);
1611 ext4_lock_group(sb, group);
1613 ext4_group_desc_csum_set(sb, group, gdp);
1614 ext4_unlock_group(sb, group);