/*
* Mark the blocks used for the inode table
*/
- if (fs->group_desc[i].bg_inode_table) {
- for (j = 0, b = fs->group_desc[i].bg_inode_table;
+ if (ext2fs_inode_table_loc(fs, i)) {
+ for (j = 0, b = ext2fs_inode_table_loc(fs, i);
j < (unsigned) fs->inode_blocks_per_group;
j++, b++)
ext2fs_mark_block_bitmap2(meta_block_map, b);
/*
* Mark block used for the block bitmap
*/
- if (fs->group_desc[i].bg_block_bitmap) {
+ if (ext2fs_block_bitmap_loc(fs, i)) {
ext2fs_mark_block_bitmap2(meta_block_map,
- fs->group_desc[i].bg_block_bitmap);
+ ext2fs_block_bitmap_loc(fs, i));
}
/*
* Mark block used for the inode bitmap
*/
- if (fs->group_desc[i].bg_inode_bitmap) {
+ if (ext2fs_inode_bitmap_loc(fs, i)) {
ext2fs_mark_block_bitmap2(meta_block_map,
- fs->group_desc[i].bg_inode_bitmap);
+ ext2fs_inode_bitmap_loc(fs, i));
}
}
}
exit(1);
}
memset(zero_buf, 0, fs->blocksize);
- for (blk = 0; blk < fs->super->s_blocks_count; blk++) {
+ for (blk = 0; blk < ext2fs_blocks_count(fs->super); blk++) {
if ((blk >= fs->super->s_first_data_block) &&
ext2fs_test_block_bitmap2(meta_block_map, blk)) {
retval = io_channel_read_blk64(fs->io, blk, 1, buf);