Lines Matching refs:current_fs
55 ext2_filsys current_fs; variable
145 current_fs = NULL; in open_filesystem()
153 current_fs = NULL; in open_filesystem()
159 current_fs = NULL; in open_filesystem()
175 io_ptr, ¤t_fs); in open_filesystem()
187 current_fs = NULL; in open_filesystem()
190 current_fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE; in open_filesystem()
195 retval = ext2fs_read_bitmaps(current_fs); in open_filesystem()
204 retval = ext2fs_set_data_io(current_fs, data_io); in open_filesystem()
216 retval = ext2fs_close_free(¤t_fs); in open_filesystem()
318 if (current_fs->flags & EXT2_FLAG_IB_DIRTY) { in close_filesystem()
319 retval = ext2fs_write_inode_bitmap(current_fs); in close_filesystem()
323 if (current_fs->flags & EXT2_FLAG_BB_DIRTY) { in close_filesystem()
324 retval = ext2fs_write_block_bitmap(current_fs); in close_filesystem()
330 retval = ext2fs_close_free(¤t_fs); in close_filesystem()
348 current_fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY; in do_close_filesys()
383 unix_io_manager, ¤t_fs); in do_init_filesys()
386 current_fs = NULL; in do_init_filesys()
453 if (ext2fs_has_feature_bigalloc(current_fs->super)) in do_show_super_stats()
456 list_super2(current_fs->super, out); in do_show_super_stats()
457 if (ext2fs_has_feature_metadata_csum(current_fs->super) && in do_show_super_stats()
458 !ext2fs_superblock_csum_verify(current_fs, in do_show_super_stats()
459 current_fs->super)) { in do_show_super_stats()
460 __u32 orig_csum = current_fs->super->s_checksum; in do_show_super_stats()
462 ext2fs_superblock_csum_set(current_fs, in do_show_super_stats()
463 current_fs->super); in do_show_super_stats()
465 current_fs->super->s_checksum); in do_show_super_stats()
466 current_fs->super->s_checksum = orig_csum; in do_show_super_stats()
468 for (i=0; i < current_fs->group_desc_count; i++) in do_show_super_stats()
469 numdirs += ext2fs_bg_used_dirs_count(current_fs, i); in do_show_super_stats()
477 gdt_csum = ext2fs_has_group_desc_csum(current_fs); in do_show_super_stats()
478 for (i = 0; i < current_fs->group_desc_count; i++) { in do_show_super_stats()
485 i, ext2fs_block_bitmap_loc(current_fs, i), in do_show_super_stats()
486 ext2fs_inode_bitmap_loc(current_fs, i), in do_show_super_stats()
487 ext2fs_inode_table_loc(current_fs, i), in do_show_super_stats()
488 ext2fs_bg_free_blocks_count(current_fs, i), units, in do_show_super_stats()
489 ext2fs_bg_free_blocks_count(current_fs, i) != 1 ? in do_show_super_stats()
491 ext2fs_bg_free_inodes_count(current_fs, i), in do_show_super_stats()
492 ext2fs_bg_free_inodes_count(current_fs, i) != 1 ? in do_show_super_stats()
494 ext2fs_bg_used_dirs_count(current_fs, i), in do_show_super_stats()
495 ext2fs_bg_used_dirs_count(current_fs, i) != 1 ? "directories" in do_show_super_stats()
499 ext2fs_bg_itable_unused(current_fs, i), in do_show_super_stats()
500 ext2fs_bg_itable_unused(current_fs, i) != 1 ? in do_show_super_stats()
503 print_bg_opts(current_fs, i, EXT2_BG_INODE_UNINIT, "Inode not init", in do_show_super_stats()
505 print_bg_opts(current_fs, i, EXT2_BG_BLOCK_UNINIT, "Block not init", in do_show_super_stats()
509 first ? " [":", ", ext2fs_bg_checksum(current_fs, i)); in do_show_super_stats()
533 current_fs->super->s_state |= EXT2_VALID_FS; in do_dirty_filesys()
535 current_fs->super->s_state &= ~EXT2_VALID_FS; in do_dirty_filesys()
536 ext2fs_mark_super_dirty(current_fs); in do_dirty_filesys()
617 if (inode->i_extra_isize > EXT2_INODE_SIZE(current_fs->super) - in internal_dump_inode_extra()
634 ext2fs_block_iterate3(current_fs, inode, BLOCK_FLAG_READ_ONLY, NULL, in dump_blocks()
668 errcode = ext2fs_extent_open(current_fs, ino, &handle); in dump_extents()
779 retval = ext2fs_inline_data_size(current_fs, inode_num, &size); in dump_inline_data()
791 retval = ext2fs_inline_data_size(current_fs, inode_num, &size); in dump_inline_symlink()
799 retval = ext2fs_inline_data_get(current_fs, inode_num, in dump_inline_symlink()
819 int os = current_fs->super->s_creator_os; in internal_dump_inode()
823 if (EXT2_INODE_SIZE(current_fs->super) > EXT2_GOOD_OLD_INODE_SIZE) in internal_dump_inode()
919 if (EXT2_INODE_SIZE(current_fs->super) > EXT2_GOOD_OLD_INODE_SIZE) in internal_dump_inode()
923 if (ext2fs_has_feature_metadata_csum(current_fs->super)) { in internal_dump_inode()
986 malloc(EXT2_INODE_SIZE(current_fs->super)); in do_stat()
998 EXT2_INODE_SIZE(current_fs->super))) { in do_stat()
1055 logical_width = int_log10((EXT2_I_SIZE(&inode)+current_fs->blocksize-1)/ in do_dump_extents()
1056 current_fs->blocksize) + 1; in do_dump_extents()
1059 physical_width = int_log10(ext2fs_blocks_count(current_fs->super)) + 1; in do_dump_extents()
1092 ext2fs_block_iterate3(current_fs, inode, BLOCK_FLAG_READ_ONLY, NULL, in do_blocks()
1107 retval = ext2fs_check_directory(current_fs, inode); in do_chroot()
1156 !ext2fs_test_inode_bitmap2(current_fs->inode_map,inode)) in do_freei()
1159 ext2fs_unmark_inode_bitmap2(current_fs->inode_map, inode++); in do_freei()
1160 ext2fs_mark_ib_dirty(current_fs); in do_freei()
1187 ext2fs_test_inode_bitmap2(current_fs->inode_map,inode)) in do_seti()
1190 ext2fs_mark_inode_bitmap2(current_fs->inode_map, inode++); in do_seti()
1191 ext2fs_mark_ib_dirty(current_fs); in do_seti()
1203 if (ext2fs_test_inode_bitmap2(current_fs->inode_map,inode)) in do_testi()
1221 if (!ext2fs_test_block_bitmap2(current_fs->block_map,block)) in do_freeb()
1224 ext2fs_unmark_block_bitmap2(current_fs->block_map,block); in do_freeb()
1227 ext2fs_mark_bb_dirty(current_fs); in do_freeb()
1241 if (ext2fs_test_block_bitmap2(current_fs->block_map,block)) in do_setb()
1244 ext2fs_mark_block_bitmap2(current_fs->block_map,block); in do_setb()
1247 ext2fs_mark_bb_dirty(current_fs); in do_setb()
1260 if (ext2fs_test_block_bitmap2(current_fs->block_map,block)) in do_testb()
1353 os = current_fs->super->s_creator_os; in do_modify_inode()
1424 retval = ext2fs_check_directory(current_fs, inode); in do_change_working_dir()
1444 retval = ext2fs_get_pathname(current_fs, cwd, 0, &pathname); in do_print_working_directory()
1455 retval = ext2fs_get_pathname(current_fs, root, 0, &pathname); in do_print_working_directory()
1493 if (! (retval=ext2fs_namei(current_fs, root, cwd, destname, &dir))) in make_link()
1516 retval = ext2fs_link(current_fs, dir, dest, ino, in make_link()
1565 if (ext2fs_test_inode_bitmap2(current_fs->inode_map, ino)) { in do_undel()
1580 ext2fs_block_iterate3(current_fs, ino, BLOCK_FLAG_READ_ONLY, NULL, in do_undel()
1583 ext2fs_inode_alloc_stats2(current_fs, ino, +1, 0); in do_undel()
1605 retval = ext2fs_unlink(current_fs, dir, base_name, 0, 0); in unlink_file_by_name()
1683 goal = current_fs->super->s_first_data_block; in do_find_free_block()
1688 retval = ext2fs_new_block2(current_fs, free_blk + 1, 0, in do_find_free_block()
1738 retval = ext2fs_new_inode(current_fs, dir, mode, 0, &free_inode); in do_find_free_inode()
1755 retval = do_write_internal(current_fs, cwd, argv[1], argv[2], root); in do_write()
1805 retval = do_mknod_internal(current_fs, cwd, argv[1], in do_mknod()
1820 retval = do_mkdir_internal(current_fs, cwd, argv[1], root); in do_mkdir()
1851 inode_buf.i_dtime = current_fs->now ? current_fs->now : time(0); in kill_file_by_inode()
1854 if (ext2fs_inode_has_valid_blocks2(current_fs, &inode_buf)) { in kill_file_by_inode()
1856 ext2fs_block_iterate3(current_fs, inode, BLOCK_FLAG_READ_ONLY, in kill_file_by_inode()
1860 ext2fs_inode_alloc_stats2(current_fs, inode, -1, in kill_file_by_inode()
1887 retval = ext2fs_namei(current_fs, root, cwd, argv[1], &inode_num); in do_rm()
1950 retval = ext2fs_namei(current_fs, root, cwd, argv[1], &inode_num); in do_rmdir()
1967 retval = ext2fs_dir_iterate2(current_fs, inode_num, 0, in do_rmdir()
2001 if (current_fs) in do_show_debugfs_params()
2003 current_fs->flags & EXT2_FLAG_RW ? "write" : "only"); in do_show_debugfs_params()
2005 current_fs ? current_fs->device_name : "--none--"); in do_show_debugfs_params()
2018 retval = ext2fs_expand_dir(current_fs, inode); in do_expand_dir()
2036 ¤t_fs->super->s_feature_compat, 0)) in do_features()
2040 ext2fs_mark_super_dirty(current_fs); in do_features()
2042 print_features(current_fs->super, stdout); in do_features()
2097 errcode = ext2fs_bmap2(current_fs, ino, 0, 0, flags, blk, in do_bmap()
2123 group = (ino - 1) / EXT2_INODES_PER_GROUP(current_fs->super); in do_imap()
2124 offset = ((ino - 1) % EXT2_INODES_PER_GROUP(current_fs->super)) * in do_imap()
2125 EXT2_INODE_SIZE(current_fs->super); in do_imap()
2126 block = offset >> EXT2_BLOCK_SIZE_BITS(current_fs->super); in do_imap()
2127 if (!ext2fs_inode_table_loc(current_fs, (unsigned)group)) { in do_imap()
2132 block_nr = ext2fs_inode_table_loc(current_fs, (unsigned)group) + in do_imap()
2134 offset &= (EXT2_BLOCK_SIZE(current_fs->super) - 1); in do_imap()
2171 isize = EXT2_INODE_SIZE(current_fs->super); in do_idump()
2178 err = ext2fs_read_inode_full(current_fs, ino, in do_idump()
2231 current_fs->now = now; in do_set_current_time()
2330 errcode = ext2fs_punch(current_fs, ino, 0, 0, start, end); in do_punch()
2366 errcode = ext2fs_fallocate(current_fs, EXT2_FALLOCATE_INIT_BEYOND_EOF, in do_fallocate()
2387 retval = do_symlink_internal(current_fs, cwd, argv[1], argv[2], root); in do_symlink()
2415 mmp_block = current_fs->super->s_mmp_block; in do_dump_mmp()
2424 if (current_fs->mmp_buf == NULL) { in do_dump_mmp()
2425 retval = ext2fs_get_mem(current_fs->blocksize, in do_dump_mmp()
2426 ¤t_fs->mmp_buf); in do_dump_mmp()
2433 mmp_s = current_fs->mmp_buf; in do_dump_mmp()
2435 retval = ext2fs_mmp_read(current_fs, mmp_block, current_fs->mmp_buf); in do_dump_mmp()
2443 fprintf(stdout, "block_number: %llu\n", current_fs->super->s_mmp_block); in do_dump_mmp()
2445 current_fs->super->s_mmp_update_interval); in do_dump_mmp()
2650 if (current_fs) in main()