Lines Matching refs:old_fs

98 	rfs->old_fs = fs;  in resize_fs()
146 ext2fs_free_blocks_count(rfs->old_fs->super), in resize_fs()
203 ext2fs_free(rfs->old_fs); in resize_fs()
275 ext2_filsys old_fs, in free_gdp_blocks() argument
281 blk = ext2fs_block_bitmap_loc(old_fs, group); in free_gdp_blocks()
288 blk = ext2fs_inode_bitmap_loc(old_fs, group); in free_gdp_blocks()
295 blk = ext2fs_inode_table_loc(old_fs, group); in free_gdp_blocks()
313 errcode_t adjust_fs_info(ext2_filsys fs, ext2_filsys old_fs, in adjust_fs_info() argument
380 blk = ext2fs_blocks_count(old_fs->super); in adjust_fs_info()
393 percent = (ext2fs_r_blocks_count(old_fs->super) * 100.0) / in adjust_fs_info()
394 ext2fs_blocks_count(old_fs->super); in adjust_fs_info()
418 if (reserve_blocks && new_size > ext2fs_blocks_count(old_fs->super)) { in adjust_fs_info()
427 if (old_fs->desc_blocks != fs->desc_blocks) { in adjust_fs_info()
428 retval = ext2fs_resize_mem(old_fs->desc_blocks * in adjust_fs_info()
434 if (fs->desc_blocks > old_fs->desc_blocks) in adjust_fs_info()
436 (old_fs->desc_blocks * fs->blocksize), 0, in adjust_fs_info()
437 (fs->desc_blocks - old_fs->desc_blocks) * in adjust_fs_info()
449 (old_fs->desc_blocks != fs->desc_blocks)) { in adjust_fs_info()
453 (old_fs->desc_blocks - fs->desc_blocks); in adjust_fs_info()
465 if (old_fs->group_desc_count > fs->group_desc_count) { in adjust_fs_info()
471 i < old_fs->group_desc_count; i++) in adjust_fs_info()
472 free_gdp_blocks(fs, reserve_blocks, old_fs, i); in adjust_fs_info()
480 old_numblocks = (ext2fs_blocks_count(old_fs->super) - in adjust_fs_info()
481 old_fs->super->s_first_data_block) % in adjust_fs_info()
482 old_fs->super->s_blocks_per_group; in adjust_fs_info()
484 old_numblocks = old_fs->super->s_blocks_per_group; in adjust_fs_info()
485 if (old_fs->group_desc_count == fs->group_desc_count) { in adjust_fs_info()
493 i = old_fs->group_desc_count - 1; in adjust_fs_info()
502 if (old_fs->group_desc_count >= fs->group_desc_count) { in adjust_fs_info()
511 old_fs->group_desc_count); in adjust_fs_info()
527 for (i = 0; i < old_fs->group_desc_count; i++) in adjust_fs_info()
530 for (i = old_fs->group_desc_count; in adjust_fs_info()
634 retval = adjust_fs_info(fs, rfs->old_fs, rfs->reserve_blocks, new_size); in adjust_superblock()
641 if ((rfs->old_fs->super->s_inodes_count - in adjust_superblock()
642 rfs->old_fs->super->s_free_inodes_count) > in adjust_superblock()
652 if (rfs->old_fs->group_desc_count > fs->group_desc_count) { in adjust_superblock()
662 if (rfs->old_fs->group_desc_count >= fs->group_desc_count) { in adjust_superblock()
689 rfs->old_fs->group_desc_count); in adjust_superblock()
690 adj = rfs->old_fs->group_desc_count; in adjust_superblock()
698 for (i = rfs->old_fs->group_desc_count; in adjust_superblock()
812 for (i=0; i < rfs->old_fs->group_desc_count; i++) { in mark_fs_metablock()
838 } else if (ext2fs_test_block_bitmap2(rfs->old_fs->block_map, blk) && in mark_fs_metablock()
860 ext2_filsys fs, old_fs; in blocks_to_move() local
865 old_fs = rfs->old_fs; in blocks_to_move()
866 if (ext2fs_blocks_count(old_fs->super) > ext2fs_blocks_count(fs->super)) in blocks_to_move()
867 fs = rfs->old_fs; in blocks_to_move()
879 retval = mark_table_blocks(old_fs, meta_bmap); in blocks_to_move()
892 if (new_size < ext2fs_blocks_count(old_fs->super)) { in blocks_to_move()
926 blk < ext2fs_blocks_count(old_fs->super); blk++) { in blocks_to_move()
930 ext2fs_bg_flags_test(old_fs, g, EXT2_BG_BLOCK_UNINIT)) { in blocks_to_move()
938 if (ext2fs_test_block_bitmap2(old_fs->block_map, blk) && in blocks_to_move()
947 old_blocks = old_fs->super->s_first_meta_bg; in blocks_to_move()
950 old_blocks = old_fs->desc_blocks + old_fs->super->s_reserved_gdt_blocks; in blocks_to_move()
960 if (max_groups > old_fs->group_desc_count) in blocks_to_move()
961 max_groups = old_fs->group_desc_count; in blocks_to_move()
962 group_blk = old_fs->super->s_first_data_block; in blocks_to_move()
1030 else if (flex_bg && i < old_fs->group_desc_count) in blocks_to_move()
1032 ext2fs_block_bitmap_loc(old_fs, i)); in blocks_to_move()
1037 else if (flex_bg && i < old_fs->group_desc_count) in blocks_to_move()
1039 ext2fs_inode_bitmap_loc(old_fs, i)); in blocks_to_move()
1045 else if (flex_bg && i < old_fs->group_desc_count) in blocks_to_move()
1047 ext2fs_inode_table_loc(old_fs, i), in blocks_to_move()
1048 old_fs->inode_blocks_per_group); in blocks_to_move()
1069 if (ext2fs_block_bitmap_loc(old_fs, i) != in blocks_to_move()
1072 if (ext2fs_test_block_bitmap2(old_fs->block_map, blk) && in blocks_to_move()
1077 if (ext2fs_inode_bitmap_loc(old_fs, i) != in blocks_to_move()
1080 if (ext2fs_test_block_bitmap2(old_fs->block_map, blk) && in blocks_to_move()
1093 if (ext2fs_inode_table_loc(fs, i) == ext2fs_inode_table_loc(old_fs, i)) in blocks_to_move()
1106 if (ext2fs_test_block_bitmap2(old_fs->block_map, blk) && in blocks_to_move()
1116 for (blk = ext2fs_inode_table_loc(rfs->old_fs, i), j=0; in blocks_to_move()
1153 ext2fs_blocks_count(rfs->old_fs->super)) in init_block_alloc()
1154 rfs->new_blk = ext2fs_blocks_count(rfs->old_fs->super); in init_block_alloc()
1180 (rfs->new_blk < ext2fs_blocks_count(rfs->old_fs->super)) && in get_new_block()
1181 ext2fs_test_block_bitmap2(rfs->old_fs->block_map, in get_new_block()
1205 ext2fs_mark_block_bitmap2(rfs->old_fs->block_map, blk); in resize2fs_get_alloc_block()
1215 ext2_filsys old_fs = rfs->old_fs; in block_mover() local
1224 old_fs->get_alloc_block = resize2fs_get_alloc_block; in block_mover()
1226 retval = ext2fs_read_bb_inode(old_fs, &badblock_list); in block_mover()
1248 for (blk = B2C(old_fs->super->s_first_data_block); in block_mover()
1249 blk < ext2fs_blocks_count(old_fs->super); in block_mover()
1251 if (!ext2fs_test_block_bitmap2(old_fs->block_map, blk)) in block_mover()
1334 retval = ext2fs_update_bb_inode(old_fs, in block_mover()
1451 if ((rfs->old_fs->group_desc_count <= in inode_scan_and_fix()
1462 orig_size = ext2fs_blocks_count(rfs->old_fs->super); in inode_scan_and_fix()
1464 ext2fs_blocks_count_set(rfs->old_fs->super, in inode_scan_and_fix()
1467 retval = ext2fs_open_inode_scan(rfs->old_fs, 0, &scan); in inode_scan_and_fix()
1470 retval = ext2fs_init_dblist(rfs->old_fs, 0); in inode_scan_and_fix()
1472 retval = ext2fs_get_array(rfs->old_fs->blocksize, 3, &block_buf); in inode_scan_and_fix()
1480 0, rfs->old_fs->group_desc_count); in inode_scan_and_fix()
1511 if (ext2fs_file_acl_block(rfs->old_fs, inode) && rfs->bmap) { in inode_scan_and_fix()
1512 new_block = extent_translate(rfs->old_fs, rfs->bmap, in inode_scan_and_fix()
1513 ext2fs_file_acl_block(rfs->old_fs, inode)); in inode_scan_and_fix()
1515 ext2fs_file_acl_block_set(rfs->old_fs, inode, in inode_scan_and_fix()
1517 retval = ext2fs_write_inode_full(rfs->old_fs, in inode_scan_and_fix()
1523 if (ext2fs_inode_has_valid_blocks2(rfs->old_fs, inode) && in inode_scan_and_fix()
1526 retval = ext2fs_block_iterate3(rfs->old_fs, in inode_scan_and_fix()
1551 retval = ext2fs_read_inode_full(rfs->old_fs, ino, in inode_scan_and_fix()
1556 retval = ext2fs_write_inode_full(rfs->old_fs, new_inode, in inode_scan_and_fix()
1571 io_channel_flush(rfs->old_fs->io); in inode_scan_and_fix()
1574 ext2fs_blocks_count_set(rfs->old_fs->super, orig_size); in inode_scan_and_fix()
1614 io_channel_flush(is->rfs->old_fs->io); in check_and_change_inodes()
1639 retval = ext2fs_read_inode(is->rfs->old_fs, dir, &inode); in check_and_change_inodes()
1642 is->err = ext2fs_write_inode(is->rfs->old_fs, dir, &inode); in check_and_change_inodes()
1663 is.max_dirs = ext2fs_dblist_count2(rfs->old_fs->dblist); in inode_ref_fix()
1674 retval = ext2fs_dblist_dir_iterate(rfs->old_fs->dblist, in inode_ref_fix()
1727 if (max_groups > rfs->old_fs->group_desc_count) in move_itables()
1728 max_groups = rfs->old_fs->group_desc_count; in move_itables()
1742 if (ext2fs_inode_table_loc(rfs->old_fs, i) != in move_itables()
1756 rfs->old_fs->flags |= EXT2_FLAG_MASTER_SB_ONLY; in move_itables()
1759 old_blk = ext2fs_inode_table_loc(rfs->old_fs, i); in move_itables()
1813 for (blk = ext2fs_inode_table_loc(rfs->old_fs, i), j=0; in move_itables()
1817 ext2fs_inode_table_loc_set(rfs->old_fs, i, new_blk); in move_itables()
1818 ext2fs_group_desc_csum_set(rfs->old_fs, i); in move_itables()
1819 ext2fs_mark_super_dirty(rfs->old_fs); in move_itables()
1820 ext2fs_flush(rfs->old_fs); in move_itables()