Lines Matching refs:old_fs
101 rfs->old_fs = fs;
127 rfs->old_fs->super->s_free_blocks_count,
168 ext2fs_free(rfs->old_fs);
294 errcode_t adjust_fs_info(ext2_filsys fs, ext2_filsys old_fs,
360 blk = old_fs->super->s_blocks_count;
371 percent = (old_fs->super->s_r_blocks_count * 100.0) /
372 old_fs->super->s_blocks_count;
395 if (old_fs->desc_blocks != fs->desc_blocks) {
396 retval = ext2fs_resize_mem(old_fs->desc_blocks *
402 if (fs->desc_blocks > old_fs->desc_blocks)
404 (old_fs->desc_blocks * fs->blocksize), 0,
405 (fs->desc_blocks - old_fs->desc_blocks) *
417 (old_fs->desc_blocks != fs->desc_blocks)) {
421 (old_fs->desc_blocks - fs->desc_blocks);
433 if (old_fs->group_desc_count > fs->group_desc_count) {
439 i < old_fs->group_desc_count; i++) {
441 &old_fs->group_desc[i]);
450 old_numblocks = (old_fs->super->s_blocks_count -
451 old_fs->super->s_first_data_block) %
452 old_fs->super->s_blocks_per_group;
454 old_numblocks = old_fs->super->s_blocks_per_group;
455 if (old_fs->group_desc_count == fs->group_desc_count) {
463 i = old_fs->group_desc_count - 1;
472 if (old_fs->group_desc_count >= fs->group_desc_count) {
481 old_fs->group_desc_count * fs->super->s_blocks_per_group;
485 adj = old_fs->group_desc_count;
492 for (i = old_fs->group_desc_count;
587 retval = adjust_fs_info(fs, rfs->old_fs, rfs->reserve_blocks, new_size);
594 if ((rfs->old_fs->super->s_inodes_count -
595 rfs->old_fs->super->s_free_inodes_count) >
605 if (rfs->old_fs->group_desc_count > fs->group_desc_count) {
615 if (rfs->old_fs->group_desc_count >= fs->group_desc_count) {
630 rfs->old_fs->group_desc_count * fs->super->s_blocks_per_group;
632 adj = rfs->old_fs->group_desc_count;
640 for (i = rfs->old_fs->group_desc_count;
760 } else if (ext2fs_test_block_bitmap(rfs->old_fs->block_map, blk) &&
781 ext2_filsys fs, old_fs;
786 old_fs = rfs->old_fs;
787 if (old_fs->super->s_blocks_count > fs->super->s_blocks_count)
788 fs = rfs->old_fs;
800 retval = mark_table_blocks(old_fs, meta_bmap);
811 blk < old_fs->super->s_blocks_count; blk++) {
815 (old_fs->group_desc[g].bg_flags & EXT2_BG_BLOCK_UNINIT)) {
824 if (ext2fs_test_block_bitmap(old_fs->block_map, blk) &&
833 old_blocks = old_fs->super->s_first_meta_bg;
836 old_blocks = old_fs->desc_blocks + old_fs->super->s_reserved_gdt_blocks;
846 if (max_groups > old_fs->group_desc_count)
847 max_groups = old_fs->group_desc_count;
848 group_blk = old_fs->super->s_first_data_block;
953 if (FS_BLOCK_BM(old_fs, i) !=
956 if (ext2fs_test_block_bitmap(old_fs->block_map, blk) &&
961 if (FS_INODE_BM(old_fs, i) !=
964 if (ext2fs_test_block_bitmap(old_fs->block_map, blk) &&
977 if (FS_INODE_TB(fs, i) == FS_INODE_TB(old_fs, i))
990 if (ext2fs_test_block_bitmap(old_fs->block_map, blk) &&
1000 for (blk = rfs->old_fs->group_desc[i].bg_inode_table, j=0;
1040 rfs->old_fs->super->s_blocks_count)
1041 rfs->new_blk = rfs->old_fs->super->s_blocks_count;
1067 (rfs->new_blk < rfs->old_fs->super->s_blocks_count) &&
1068 ext2fs_test_block_bitmap(rfs->old_fs->block_map,
1092 ext2fs_mark_block_bitmap(rfs->old_fs->block_map, blk);
1102 ext2_filsys old_fs = rfs->old_fs;
1110 old_fs->get_alloc_block = resize2fs_get_alloc_block;
1112 retval = ext2fs_read_bb_inode(old_fs, &badblock_list);
1134 for (blk = old_fs->super->s_first_data_block;
1135 blk < old_fs->super->s_blocks_count; blk++) {
1136 old_fs->block_map, blk))
1216 retval = ext2fs_update_bb_inode(old_fs,
1318 if ((rfs->old_fs->group_desc_count <=
1329 orig_size = rfs->old_fs->super->s_blocks_count;
1331 rfs->old_fs->super->s_blocks_count =
1334 retval = ext2fs_open_inode_scan(rfs->old_fs, 0, &scan);
1337 retval = ext2fs_init_dblist(rfs->old_fs, 0);
1339 retval = ext2fs_get_array(rfs->old_fs->blocksize, 3, &block_buf);
1347 0, rfs->old_fs->group_desc_count);
1383 retval = ext2fs_write_inode_full(rfs->old_fs,
1392 retval = ext2fs_block_iterate2(rfs->old_fs,
1417 retval = ext2fs_read_inode_full(rfs->old_fs, ino,
1422 retval = ext2fs_write_inode_full(rfs->old_fs, new_inode,
1437 io_channel_flush(rfs->old_fs->io);
1440 rfs->old_fs->super->s_blocks_count = orig_size;
1480 io_channel_flush(is->rfs->old_fs->io);
1505 retval = ext2fs_read_inode(is->rfs->old_fs, dir, &inode);
1508 is->err = ext2fs_write_inode(is->rfs->old_fs, dir, &inode);
1529 is.max_dirs = ext2fs_dblist_count(rfs->old_fs->dblist);
1540 retval = ext2fs_dblist_dir_iterate(rfs->old_fs->dblist,
1592 if (max_groups > rfs->old_fs->group_desc_count)
1593 max_groups = rfs->old_fs->group_desc_count;
1607 if (rfs->old_fs->group_desc[i].bg_inode_table !=
1621 rfs->old_fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;
1624 old_blk = rfs->old_fs->group_desc[i].bg_inode_table;
1678 for (blk = rfs->old_fs->group_desc[i].bg_inode_table, j=0;
1682 rfs->old_fs->group_desc[i].bg_inode_table = new_blk;
1683 ext2fs_group_desc_csum_set(rfs->old_fs, i);
1684 ext2fs_mark_super_dirty(rfs->old_fs);
1685 ext2fs_flush(rfs->old_fs);