Lines Matching refs:grp
245 #define GRP_GET_GROUP_BBM(fs,grp) ( get_blk((fs),(fs)->gd[(grp)].bg_block_bitmap) ) argument
248 #define GRP_GET_GROUP_IBM(fs,grp) ( get_blk((fs),(fs)->gd[(grp)].bg_inode_bitmap) ) argument
830 int grp,offset; in get_nod() local
834 grp = GRP_GROUP_OF_INODE(fs,nod); in get_nod()
835 itab = (inode *)get_blk(fs, fs->gd[grp].bg_inode_table); in get_nod()
877 uint32 grp,nbgroups; in alloc_blk() local
879 grp = GRP_GROUP_OF_INODE(fs,nod); in alloc_blk()
881 if(!(bk = allocate(get_blk(fs,fs->gd[grp].bg_block_bitmap), 0))) { in alloc_blk()
882 for(grp=0;grp<nbgroups && !bk;grp++) in alloc_blk()
883 bk=allocate(get_blk(fs,fs->gd[grp].bg_block_bitmap),0); in alloc_blk()
884 grp--; in alloc_blk()
888 if(!(fs->gd[grp].bg_free_blocks_count--)) in alloc_blk()
889 error_msg_and_die("group descr %d. free blocks count == 0 (corrupted fs?)",grp); in alloc_blk()
892 return fs->sb.s_blocks_per_group*grp + bk; in alloc_blk()
899 uint32 grp; in free_blk() local
901 grp = bk / fs->sb.s_blocks_per_group; in free_blk()
903 deallocate(get_blk(fs,fs->gd[grp].bg_block_bitmap), bk); in free_blk()
904 fs->gd[grp].bg_free_blocks_count++; in free_blk()
913 uint32 grp,nbgroups,avefreei; in alloc_nod() local
923 for(grp=0; grp<nbgroups; grp++) { in alloc_nod()
924 if (fs->gd[grp].bg_free_inodes_count < avefreei || in alloc_nod()
925 fs->gd[grp].bg_free_inodes_count == 0) in alloc_nod()
928 fs->gd[grp].bg_free_blocks_count > fs->gd[best_group].bg_free_blocks_count) in alloc_nod()
929 best_group = grp; in alloc_nod()