Lines Matching refs:group
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()
208 int group, best_group = -1; in find_group_dir() local
210 for (group = 0; group < ngroups; group++) { in find_group_dir()
211 desc = ext2_get_group_desc (sb, group, NULL); in find_group_dir()
219 best_group = group; in find_group_dir()
269 int group = -1, i; in find_group_orlov() local
284 group = prandom_u32(); in find_group_orlov()
285 parent_group = (unsigned)group % ngroups; in find_group_orlov()
287 group = (parent_group + i) % ngroups; in find_group_orlov()
288 desc = ext2_get_group_desc (sb, group, NULL); in find_group_orlov()
297 best_group = group; in find_group_orlov()
303 group = best_group; in find_group_orlov()
327 group = (parent_group + i) % ngroups; in find_group_orlov()
328 desc = ext2_get_group_desc (sb, group, NULL); in find_group_orlov()
331 if (sbi->s_debts[group] >= max_debt) in find_group_orlov()
344 group = (parent_group + i) % ngroups; in find_group_orlov()
345 desc = ext2_get_group_desc (sb, group, NULL); in find_group_orlov()
364 return group; in find_group_orlov()
372 int group, i; in find_group_other() local
377 group = parent_group; in find_group_other()
378 desc = ext2_get_group_desc (sb, group, NULL); in find_group_other()
392 group = (group + parent->i_ino) % ngroups; in find_group_other()
399 group += i; in find_group_other()
400 if (group >= ngroups) in find_group_other()
401 group -= ngroups; in find_group_other()
402 desc = ext2_get_group_desc (sb, group, NULL); in find_group_other()
412 group = parent_group; in find_group_other()
414 if (++group >= ngroups) in find_group_other()
415 group = 0; in find_group_other()
416 desc = ext2_get_group_desc (sb, group, NULL); in find_group_other()
424 return group; in find_group_other()
433 int group, i; in ext2_new_inode() local
452 group = find_group_dir(sb, dir); in ext2_new_inode()
454 group = find_group_orlov(sb, dir); in ext2_new_inode()
456 group = find_group_other(sb, dir); in ext2_new_inode()
458 if (group == -1) { in ext2_new_inode()
464 gdp = ext2_get_group_desc(sb, group, &bh2); in ext2_new_inode()
466 if (++group == sbi->s_groups_count) in ext2_new_inode()
467 group = 0; in ext2_new_inode()
471 bitmap_bh = read_inode_bitmap(sb, group); in ext2_new_inode()
490 if (++group == sbi->s_groups_count) in ext2_new_inode()
491 group = 0; in ext2_new_inode()
494 if (ext2_set_bit_atomic(sb_bgl_lock(sbi, group), in ext2_new_inode()
499 if (++group == sbi->s_groups_count) in ext2_new_inode()
500 group = 0; in ext2_new_inode()
521 ino += group * EXT2_INODES_PER_GROUP(sb) + 1; in ext2_new_inode()
525 "block_group = %d,inode=%lu", group, in ext2_new_inode()
535 spin_lock(sb_bgl_lock(sbi, group)); in ext2_new_inode()
538 if (sbi->s_debts[group] < 255) in ext2_new_inode()
539 sbi->s_debts[group]++; in ext2_new_inode()
542 if (sbi->s_debts[group]) in ext2_new_inode()
543 sbi->s_debts[group]--; in ext2_new_inode()
545 spin_unlock(sb_bgl_lock(sbi, group)); in ext2_new_inode()
568 ei->i_block_group = group; in ext2_new_inode()