Lines Matching refs: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)
71 desc = ext2_get_group_desc(sb, group, &bh);
74 "can't get descriptor for group %d", group);
78 spin_lock(sb_bgl_lock(EXT2_SB(sb), group));
82 spin_unlock(sb_bgl_lock(EXT2_SB(sb), group));
180 * Figure out the offset within the block group inode table
191 * a directory, then a forward search is made for a block group with both
193 * the groups with above-average free space, that group with the fewest
197 * group to find a free inode.
204 int group, best_group = -1;
206 for (group = 0; group < ngroups; group++) {
207 desc = ext2_get_group_desc (sb, group, NULL);
215 best_group = group;
230 * Otherwise we simply return a random group.
234 * It's OK to put directory into a group unless
239 * Parent's group is preferred, if it doesn't satisfy these
241 * of the groups look good we just look for a group with more
242 * free inodes than average (starting at parent's group).
265 int group = -1, i;
281 group = (parent_group + i) % ngroups;
282 desc = ext2_get_group_desc (sb, group, NULL);
291 best_group = group;
295 group = best_group;
319 group = (parent_group + i) % ngroups;
320 desc = ext2_get_group_desc (sb, group, NULL);
323 if (sbi->s_debts[group] >= max_debt)
336 group = (parent_group + i) % ngroups;
337 desc = ext2_get_group_desc (sb, group, NULL);
356 return group;
364 int group, i;
369 group = parent_group;
370 desc = ext2_get_group_desc (sb, group, NULL);
384 group = (group + parent->i_ino) % ngroups;
387 * Use a quadratic hash to find a group with a free inode and some
391 group += i;
392 if (group >= ngroups)
393 group -= ngroups;
394 desc = ext2_get_group_desc (sb, group, NULL);
401 * That failed: try linear search for a free inode, even if that group
404 group = parent_group;
406 if (++group >= ngroups)
407 group = 0;
408 desc = ext2_get_group_desc (sb, group, NULL);
416 return group;
425 int group, i;
444 group = find_group_dir(sb, dir);
446 group = find_group_orlov(sb, dir);
448 group = find_group_other(sb, dir);
450 if (group == -1) {
456 gdp = ext2_get_group_desc(sb, group, &bh2);
458 if (++group == sbi->s_groups_count)
459 group = 0;
463 bitmap_bh = read_inode_bitmap(sb, group);
476 * free inodes in this group, but by the time we tried
480 * next block group.
482 if (++group == sbi->s_groups_count)
483 group = 0;
486 if (ext2_set_bit_atomic(sb_bgl_lock(sbi, group),
490 /* this group is exhausted, try next group */
491 if (++group == sbi->s_groups_count)
492 group = 0;
495 /* try to find free inode in the same group */
513 ino += group * EXT2_INODES_PER_GROUP(sb) + 1;
517 "block_group = %d,inode=%lu", group,
527 spin_lock(sb_bgl_lock(sbi, group));
530 if (sbi->s_debts[group] < 255)
531 sbi->s_debts[group]++;
534 if (sbi->s_debts[group])
535 sbi->s_debts[group]--;
537 spin_unlock(sb_bgl_lock(sbi, group));
560 ei->i_block_group = group;
637 printk("group %d: stored = %d, counted = %u\n",