Lines Matching refs:current_fs
57 ext2_filsys current_fs = NULL; variable
69 current_fs = NULL; in open_filesystem()
77 current_fs = NULL; in open_filesystem()
83 current_fs = NULL; in open_filesystem()
97 unix_io_manager, ¤t_fs); in open_filesystem()
100 current_fs = NULL; in open_filesystem()
103 current_fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE; in open_filesystem()
108 retval = ext2fs_read_inode_bitmap(current_fs); in open_filesystem()
113 retval = ext2fs_read_block_bitmap(current_fs); in open_filesystem()
121 retval = ext2fs_set_data_io(current_fs, data_io); in open_filesystem()
133 retval = ext2fs_close(current_fs); in open_filesystem()
136 current_fs = NULL; in open_filesystem()
229 if (current_fs->flags & EXT2_FLAG_IB_DIRTY) { in close_filesystem()
230 retval = ext2fs_write_inode_bitmap(current_fs); in close_filesystem()
234 if (current_fs->flags & EXT2_FLAG_BB_DIRTY) { in close_filesystem()
235 retval = ext2fs_write_block_bitmap(current_fs); in close_filesystem()
239 retval = ext2fs_close(current_fs); in close_filesystem()
242 current_fs = NULL; in close_filesystem()
257 current_fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY; in do_close_filesys()
293 unix_io_manager, ¤t_fs); in do_init_filesys()
296 current_fs = NULL; in do_init_filesys()
361 if (EXT2_HAS_RO_COMPAT_FEATURE(current_fs->super, in do_show_super_stats()
365 list_super2(current_fs->super, out); in do_show_super_stats()
366 for (i=0; i < current_fs->group_desc_count; i++) in do_show_super_stats()
367 numdirs += ext2fs_bg_used_dirs_count(current_fs, i); in do_show_super_stats()
375 gdt_csum = EXT2_HAS_RO_COMPAT_FEATURE(current_fs->super, in do_show_super_stats()
377 for (i = 0; i < current_fs->group_desc_count; i++) { in do_show_super_stats()
384 i, ext2fs_block_bitmap_loc(current_fs, i), in do_show_super_stats()
385 ext2fs_inode_bitmap_loc(current_fs, i), in do_show_super_stats()
386 ext2fs_inode_table_loc(current_fs, i), in do_show_super_stats()
387 ext2fs_bg_free_blocks_count(current_fs, i), units, in do_show_super_stats()
388 ext2fs_bg_free_blocks_count(current_fs, i) != 1 ? in do_show_super_stats()
390 ext2fs_bg_free_inodes_count(current_fs, i), in do_show_super_stats()
391 ext2fs_bg_free_inodes_count(current_fs, i) != 1 ? in do_show_super_stats()
393 ext2fs_bg_used_dirs_count(current_fs, i), in do_show_super_stats()
394 ext2fs_bg_used_dirs_count(current_fs, i) != 1 ? "directories" in do_show_super_stats()
398 ext2fs_bg_itable_unused(current_fs, i), in do_show_super_stats()
399 ext2fs_bg_itable_unused(current_fs, i) != 1 ? in do_show_super_stats()
402 print_bg_opts(current_fs, i, EXT2_BG_INODE_UNINIT, "Inode not init", in do_show_super_stats()
404 print_bg_opts(current_fs, i, EXT2_BG_BLOCK_UNINIT, "Block not init", in do_show_super_stats()
408 first ? " [":", ", ext2fs_bg_checksum(current_fs, i)); in do_show_super_stats()
430 current_fs->super->s_state |= EXT2_VALID_FS; in do_dirty_filesys()
432 current_fs->super->s_state &= ~EXT2_VALID_FS; in do_dirty_filesys()
433 ext2fs_mark_super_dirty(current_fs); in do_dirty_filesys()
540 if (inode->i_extra_isize > EXT2_INODE_SIZE(current_fs->super) - in internal_dump_inode_extra()
546 storage_size = EXT2_INODE_SIZE(current_fs->super) - in internal_dump_inode_extra()
553 end = (char *) inode + EXT2_INODE_SIZE(current_fs->super); in internal_dump_inode_extra()
585 ext2fs_block_iterate3(current_fs, inode, BLOCK_FLAG_READ_ONLY, NULL, in dump_blocks()
619 errcode = ext2fs_extent_open(current_fs, ino, &handle); in dump_extents()
730 int os = current_fs->super->s_creator_os; in internal_dump_inode()
734 if (EXT2_INODE_SIZE(current_fs->super) > EXT2_GOOD_OLD_INODE_SIZE) in internal_dump_inode()
818 if (EXT2_INODE_SIZE(current_fs->super) > EXT2_GOOD_OLD_INODE_SIZE) in internal_dump_inode()
821 if (LINUX_S_ISLNK(inode->i_mode) && ext2fs_inode_data_blocks(current_fs,inode) == 0) in internal_dump_inode()
867 malloc(EXT2_INODE_SIZE(current_fs->super)); in do_stat()
879 EXT2_INODE_SIZE(current_fs->super))) { in do_stat()
935 logical_width = int_log10((EXT2_I_SIZE(&inode)+current_fs->blocksize-1)/ in do_dump_extents()
936 current_fs->blocksize) + 1; in do_dump_extents()
939 physical_width = int_log10(ext2fs_blocks_count(current_fs->super)) + 1; in do_dump_extents()
971 ext2fs_block_iterate3(current_fs, inode, BLOCK_FLAG_READ_ONLY, NULL, in do_blocks()
985 retval = ext2fs_check_directory(current_fs, inode); in do_chroot()
1032 !ext2fs_test_inode_bitmap2(current_fs->inode_map,inode)) in do_freei()
1035 ext2fs_unmark_inode_bitmap2(current_fs->inode_map, inode++); in do_freei()
1036 ext2fs_mark_ib_dirty(current_fs); in do_freei()
1062 ext2fs_test_inode_bitmap2(current_fs->inode_map,inode)) in do_seti()
1065 ext2fs_mark_inode_bitmap2(current_fs->inode_map, inode++); in do_seti()
1066 ext2fs_mark_ib_dirty(current_fs); in do_seti()
1077 if (ext2fs_test_inode_bitmap2(current_fs->inode_map,inode)) in do_testi()
1094 if (!ext2fs_test_block_bitmap2(current_fs->block_map,block)) in do_freeb()
1097 ext2fs_unmark_block_bitmap2(current_fs->block_map,block); in do_freeb()
1100 ext2fs_mark_bb_dirty(current_fs); in do_freeb()
1113 if (ext2fs_test_block_bitmap2(current_fs->block_map,block)) in do_setb()
1116 ext2fs_mark_block_bitmap2(current_fs->block_map,block); in do_setb()
1119 ext2fs_mark_bb_dirty(current_fs); in do_setb()
1131 if (ext2fs_test_block_bitmap2(current_fs->block_map,block)) in do_testb()
1223 os = current_fs->super->s_creator_os; in do_modify_inode()
1293 retval = ext2fs_check_directory(current_fs, inode); in do_change_working_dir()
1311 retval = ext2fs_get_pathname(current_fs, cwd, 0, &pathname); in do_print_working_directory()
1322 retval = ext2fs_get_pathname(current_fs, root, 0, &pathname); in do_print_working_directory()
1360 if (! (retval=ext2fs_namei(current_fs, root, cwd, destname, &dir))) in make_link()
1383 retval = ext2fs_link(current_fs, dir, dest, ino, in make_link()
1430 if (ext2fs_test_inode_bitmap2(current_fs->inode_map, ino)) { in do_undel()
1445 ext2fs_block_iterate3(current_fs, ino, BLOCK_FLAG_READ_ONLY, NULL, in do_undel()
1448 ext2fs_inode_alloc_stats2(current_fs, ino, +1, 0); in do_undel()
1470 retval = ext2fs_unlink(current_fs, dir, base_name, 0, 0); in unlink_file_by_name()
1517 goal = current_fs->super->s_first_data_block; in do_find_free_block()
1522 retval = ext2fs_new_block2(current_fs, free_blk + 1, 0, in do_find_free_block()
1570 retval = ext2fs_new_inode(current_fs, dir, mode, 0, &free_inode); in do_find_free_inode()
1589 retval = ext2fs_file_open(current_fs, newfile, in copy_file()
1680 retval = ext2fs_namei(current_fs, root, cwd, argv[2], &newfile); in do_write()
1687 retval = ext2fs_new_inode(current_fs, cwd, 010755, 0, &newfile); in do_write()
1694 retval = ext2fs_link(current_fs, cwd, argv[2], newfile, in do_write()
1697 retval = ext2fs_expand_dir(current_fs, cwd); in do_write()
1703 retval = ext2fs_link(current_fs, cwd, argv[2], newfile, in do_write()
1711 if (ext2fs_test_inode_bitmap2(current_fs->inode_map,newfile)) in do_write()
1713 ext2fs_inode_alloc_stats2(current_fs, newfile, +1, 0); in do_write()
1717 current_fs->now ? current_fs->now : time(0); in do_write()
1720 if (current_fs->super->s_feature_incompat & in do_write()
1800 retval = ext2fs_new_inode(current_fs, cwd, 010755, 0, &newfile); in do_mknod()
1806 retval = ext2fs_link(current_fs, cwd, argv[1], newfile, filetype); in do_mknod()
1808 retval = ext2fs_expand_dir(current_fs, cwd); in do_mknod()
1813 retval = ext2fs_link(current_fs, cwd, argv[1], newfile, in do_mknod()
1820 if (ext2fs_test_inode_bitmap2(current_fs->inode_map,newfile)) in do_mknod()
1822 ext2fs_inode_alloc_stats2(current_fs, newfile, +1, 0); in do_mknod()
1826 current_fs->now ? current_fs->now : time(0); in do_mknod()
1865 retval = ext2fs_mkdir(current_fs, parent, 0, name); in do_mkdir()
1867 retval = ext2fs_expand_dir(current_fs, parent); in do_mkdir()
1900 inode_buf.i_dtime = current_fs->now ? current_fs->now : time(0); in kill_file_by_inode()
1903 if (!ext2fs_inode_has_valid_blocks2(current_fs, &inode_buf)) in kill_file_by_inode()
1906 ext2fs_block_iterate3(current_fs, inode, BLOCK_FLAG_READ_ONLY, NULL, in kill_file_by_inode()
1909 ext2fs_inode_alloc_stats2(current_fs, inode, -1, in kill_file_by_inode()
1934 retval = ext2fs_namei(current_fs, root, cwd, argv[1], &inode_num); in do_rm()
1996 retval = ext2fs_namei(current_fs, root, cwd, argv[1], &inode_num); in do_rmdir()
2013 retval = ext2fs_dir_iterate2(current_fs, inode_num, 0, in do_rmdir()
2045 if (current_fs) in do_show_debugfs_params()
2047 current_fs->flags & EXT2_FLAG_RW ? "write" : "only"); in do_show_debugfs_params()
2049 current_fs ? current_fs->device_name : "--none--"); in do_show_debugfs_params()
2061 retval = ext2fs_expand_dir(current_fs, inode); in do_expand_dir()
2078 ¤t_fs->super->s_feature_compat, 0)) in do_features()
2082 ext2fs_mark_super_dirty(current_fs); in do_features()
2084 print_features(current_fs->super, stdout); in do_features()
2106 errcode = ext2fs_bmap2(current_fs, ino, 0, 0, 0, blk, 0, &pblk); in do_bmap()
2127 group = (ino - 1) / EXT2_INODES_PER_GROUP(current_fs->super); in do_imap()
2128 offset = ((ino - 1) % EXT2_INODES_PER_GROUP(current_fs->super)) * in do_imap()
2129 EXT2_INODE_SIZE(current_fs->super); in do_imap()
2130 block = offset >> EXT2_BLOCK_SIZE_BITS(current_fs->super); in do_imap()
2131 if (!ext2fs_inode_table_loc(current_fs, (unsigned)group)) { in do_imap()
2136 block_nr = ext2fs_inode_table_loc(current_fs, (unsigned)group) + in do_imap()
2138 offset &= (EXT2_BLOCK_SIZE(current_fs->super) - 1); in do_imap()
2163 current_fs->now = now; in do_set_current_time()
2259 errcode = ext2fs_punch(current_fs, ino, 0, 0, start, end); in do_punch()
2297 retval = ext2fs_symlink(current_fs, parent, 0, name, target); in do_symlink()
2299 retval = ext2fs_expand_dir(current_fs, parent); in do_symlink()
2323 sb = current_fs->super; in do_dump_mmp()
2325 if (current_fs->mmp_buf == NULL) { in do_dump_mmp()
2326 retval = ext2fs_get_mem(current_fs->blocksize, in do_dump_mmp()
2327 ¤t_fs->mmp_buf); in do_dump_mmp()
2334 mmp_s = current_fs->mmp_buf; in do_dump_mmp()
2336 retval = ext2fs_mmp_read(current_fs, current_fs->super->s_mmp_block, in do_dump_mmp()
2337 current_fs->mmp_buf); in do_dump_mmp()
2344 fprintf(stdout, "block_number: %llu\n", current_fs->super->s_mmp_block); in do_dump_mmp()
2346 current_fs->super->s_mmp_update_interval); in do_dump_mmp()
2515 if (current_fs) in main()