• Home
  • Raw
  • Download

Lines Matching full:group

31  * blocks groups.  Each group contains 1 bitmap block for blocks, 1 bitmap
34 * The file system contains group descriptors which are located after the
66 static void ext2_release_inode(struct super_block *sb, int group, int dir) in ext2_release_inode() argument
71 desc = ext2_get_group_desc(sb, group, &bh); in ext2_release_inode()
74 "can't get descriptor for group %d", group); in ext2_release_inode()
78 spin_lock(sb_bgl_lock(EXT2_SB(sb), group)); in ext2_release_inode()
82 spin_unlock(sb_bgl_lock(EXT2_SB(sb), group)); in ext2_release_inode()
185 * Figure out the offset within the block group inode table in ext2_preread_inode()
196 * a directory, then a forward search is made for a block group with both
198 * the groups with above-average free space, that group with the fewest
202 * group to find a free inode.
209 int group, best_group = -1; in find_group_dir() local
211 for (group = 0; group < ngroups; group++) { in find_group_dir()
212 desc = ext2_get_group_desc (sb, group, NULL); in find_group_dir()
220 best_group = group; in find_group_dir()
235 * Otherwise we simply return a random group.
239 * It's OK to put directory into a group unless
244 * Parent's group is preferred, if it doesn't satisfy these
246 * of the groups look good we just look for a group with more
247 * free inodes than average (starting at parent's group).
270 int group = -1, i; in find_group_orlov() local
285 group = prandom_u32(); in find_group_orlov()
286 parent_group = (unsigned)group % ngroups; in find_group_orlov()
288 group = (parent_group + i) % ngroups; in find_group_orlov()
289 desc = ext2_get_group_desc (sb, group, NULL); in find_group_orlov()
298 best_group = group; in find_group_orlov()
304 group = best_group; in find_group_orlov()
328 group = (parent_group + i) % ngroups; in find_group_orlov()
329 desc = ext2_get_group_desc (sb, group, NULL); in find_group_orlov()
332 if (sbi->s_debts[group] >= max_debt) in find_group_orlov()
345 group = (parent_group + i) % ngroups; in find_group_orlov()
346 desc = ext2_get_group_desc (sb, group, NULL); in find_group_orlov()
365 return group; in find_group_orlov()
373 int group, i; in find_group_other() local
378 group = parent_group; in find_group_other()
379 desc = ext2_get_group_desc (sb, group, NULL); in find_group_other()
393 group = (group + parent->i_ino) % ngroups; in find_group_other()
396 * Use a quadratic hash to find a group with a free inode and some in find_group_other()
400 group += i; in find_group_other()
401 if (group >= ngroups) in find_group_other()
402 group -= ngroups; in find_group_other()
403 desc = ext2_get_group_desc (sb, group, NULL); in find_group_other()
410 * That failed: try linear search for a free inode, even if that group in find_group_other()
413 group = parent_group; in find_group_other()
415 if (++group >= ngroups) in find_group_other()
416 group = 0; in find_group_other()
417 desc = ext2_get_group_desc (sb, group, NULL); in find_group_other()
425 return group; in find_group_other()
434 int group, i; in ext2_new_inode() local
453 group = find_group_dir(sb, dir); in ext2_new_inode()
455 group = find_group_orlov(sb, dir); in ext2_new_inode()
457 group = find_group_other(sb, dir); in ext2_new_inode()
459 if (group == -1) { in ext2_new_inode()
465 gdp = ext2_get_group_desc(sb, group, &bh2); in ext2_new_inode()
467 if (++group == sbi->s_groups_count) in ext2_new_inode()
468 group = 0; in ext2_new_inode()
472 bitmap_bh = read_inode_bitmap(sb, group); in ext2_new_inode()
485 * free inodes in this group, but by the time we tried in ext2_new_inode()
489 * next block group. in ext2_new_inode()
491 if (++group == sbi->s_groups_count) in ext2_new_inode()
492 group = 0; in ext2_new_inode()
495 if (ext2_set_bit_atomic(sb_bgl_lock(sbi, group), in ext2_new_inode()
499 /* this group is exhausted, try next group */ in ext2_new_inode()
500 if (++group == sbi->s_groups_count) in ext2_new_inode()
501 group = 0; in ext2_new_inode()
504 /* try to find free inode in the same group */ in ext2_new_inode()
522 ino += group * EXT2_INODES_PER_GROUP(sb) + 1; in ext2_new_inode()
526 "block_group = %d,inode=%lu", group, in ext2_new_inode()
536 spin_lock(sb_bgl_lock(sbi, group)); in ext2_new_inode()
539 if (sbi->s_debts[group] < 255) in ext2_new_inode()
540 sbi->s_debts[group]++; in ext2_new_inode()
543 if (sbi->s_debts[group]) in ext2_new_inode()
544 sbi->s_debts[group]--; in ext2_new_inode()
546 spin_unlock(sb_bgl_lock(sbi, group)); in ext2_new_inode()
569 ei->i_block_group = group; in ext2_new_inode()
646 printk("group %d: stored = %d, counted = %u\n", in ext2_count_free_inodes()