Lines Matching refs:gd
86 static void endian_swap_group_desc(struct ext2_group_desc *gd) { in endian_swap_group_desc() argument
87 LE32SWAP(gd->bg_block_bitmap); in endian_swap_group_desc()
88 LE32SWAP(gd->bg_inode_bitmap); in endian_swap_group_desc()
89 LE32SWAP(gd->bg_inode_table); in endian_swap_group_desc()
90 LE16SWAP(gd->bg_free_blocks_count); in endian_swap_group_desc()
91 LE16SWAP(gd->bg_free_inodes_count); in endian_swap_group_desc()
92 LE16SWAP(gd->bg_used_dirs_count); in endian_swap_group_desc()
146 ext2->gd = malloc(sizeof(struct ext2_group_desc) * ext2->s_group_count); in ext2_mount()
147 err = bio_read(ext2->dev, (void *)ext2->gd, in ext2_mount()
157 endian_swap_group_desc(&ext2->gd[i]); in ext2_mount()
159 LTRACEF("\tblock bitmap %d\n", ext2->gd[i].bg_block_bitmap); in ext2_mount()
160 LTRACEF("\tinode bitmap %d\n", ext2->gd[i].bg_inode_bitmap); in ext2_mount()
161 LTRACEF("\tinode table %d\n", ext2->gd[i].bg_inode_table); in ext2_mount()
162 LTRACEF("\tfree blocks %d\n", ext2->gd[i].bg_free_blocks_count); in ext2_mount()
163 LTRACEF("\tfree inodes %d\n", ext2->gd[i].bg_free_inodes_count); in ext2_mount()
164 LTRACEF("\tused dirs %d\n", ext2->gd[i].bg_used_dirs_count); in ext2_mount()
193 free(ext2->gd); in ext2_unmount()
205 *block = ext2->gd[group].bg_inode_table; in get_inode_addr()