Lines Matching refs:current_fs
55 ext2_filsys current_fs; variable
143 current_fs = NULL; in open_filesystem()
151 current_fs = NULL; in open_filesystem()
157 current_fs = NULL; in open_filesystem()
177 io_ptr, ¤t_fs); in open_filesystem()
182 current_fs = NULL; in open_filesystem()
185 current_fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE; in open_filesystem()
190 retval = ext2fs_read_inode_bitmap(current_fs); in open_filesystem()
195 retval = ext2fs_read_block_bitmap(current_fs); in open_filesystem()
203 retval = ext2fs_set_data_io(current_fs, data_io); in open_filesystem()
215 retval = ext2fs_close_free(¤t_fs); in open_filesystem()
315 if (current_fs->flags & EXT2_FLAG_IB_DIRTY) { in close_filesystem()
316 retval = ext2fs_write_inode_bitmap(current_fs); in close_filesystem()
320 if (current_fs->flags & EXT2_FLAG_BB_DIRTY) { in close_filesystem()
321 retval = ext2fs_write_block_bitmap(current_fs); in close_filesystem()
327 retval = ext2fs_close_free(¤t_fs); in close_filesystem()
344 current_fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY; in do_close_filesys()
378 unix_io_manager, ¤t_fs); in do_init_filesys()
381 current_fs = NULL; in do_init_filesys()
446 if (ext2fs_has_feature_bigalloc(current_fs->super)) in do_show_super_stats()
449 list_super2(current_fs->super, out); in do_show_super_stats()
450 for (i=0; i < current_fs->group_desc_count; i++) in do_show_super_stats()
451 numdirs += ext2fs_bg_used_dirs_count(current_fs, i); in do_show_super_stats()
459 gdt_csum = ext2fs_has_group_desc_csum(current_fs); in do_show_super_stats()
460 for (i = 0; i < current_fs->group_desc_count; i++) { in do_show_super_stats()
467 i, ext2fs_block_bitmap_loc(current_fs, i), in do_show_super_stats()
468 ext2fs_inode_bitmap_loc(current_fs, i), in do_show_super_stats()
469 ext2fs_inode_table_loc(current_fs, i), in do_show_super_stats()
470 ext2fs_bg_free_blocks_count(current_fs, i), units, in do_show_super_stats()
471 ext2fs_bg_free_blocks_count(current_fs, i) != 1 ? in do_show_super_stats()
473 ext2fs_bg_free_inodes_count(current_fs, i), in do_show_super_stats()
474 ext2fs_bg_free_inodes_count(current_fs, i) != 1 ? in do_show_super_stats()
476 ext2fs_bg_used_dirs_count(current_fs, i), in do_show_super_stats()
477 ext2fs_bg_used_dirs_count(current_fs, i) != 1 ? "directories" in do_show_super_stats()
481 ext2fs_bg_itable_unused(current_fs, i), in do_show_super_stats()
482 ext2fs_bg_itable_unused(current_fs, i) != 1 ? in do_show_super_stats()
485 print_bg_opts(current_fs, i, EXT2_BG_INODE_UNINIT, "Inode not init", in do_show_super_stats()
487 print_bg_opts(current_fs, i, EXT2_BG_BLOCK_UNINIT, "Block not init", in do_show_super_stats()
491 first ? " [":", ", ext2fs_bg_checksum(current_fs, i)); in do_show_super_stats()
513 current_fs->super->s_state |= EXT2_VALID_FS; in do_dirty_filesys()
515 current_fs->super->s_state &= ~EXT2_VALID_FS; in do_dirty_filesys()
516 ext2fs_mark_super_dirty(current_fs); in do_dirty_filesys()
597 if (inode->i_extra_isize > EXT2_INODE_SIZE(current_fs->super) - in internal_dump_inode_extra()
614 ext2fs_block_iterate3(current_fs, inode, BLOCK_FLAG_READ_ONLY, NULL, in dump_blocks()
648 errcode = ext2fs_extent_open(current_fs, ino, &handle); in dump_extents()
759 retval = ext2fs_inline_data_size(current_fs, inode_num, &size); in dump_inline_data()
772 retval = ext2fs_inline_data_size(current_fs, inode_num, &size); in dump_fast_link()
780 retval = ext2fs_inline_data_get(current_fs, inode_num, in dump_fast_link()
809 int os = current_fs->super->s_creator_os; in internal_dump_inode()
813 if (EXT2_INODE_SIZE(current_fs->super) > EXT2_GOOD_OLD_INODE_SIZE) in internal_dump_inode()
910 if (EXT2_INODE_SIZE(current_fs->super) > EXT2_GOOD_OLD_INODE_SIZE) in internal_dump_inode()
914 if (ext2fs_has_feature_metadata_csum(current_fs->super)) { in internal_dump_inode()
926 ext2fs_inode_data_blocks(current_fs, inode) == 0) in internal_dump_inode()
973 malloc(EXT2_INODE_SIZE(current_fs->super)); in do_stat()
985 EXT2_INODE_SIZE(current_fs->super))) { in do_stat()
1041 logical_width = int_log10((EXT2_I_SIZE(&inode)+current_fs->blocksize-1)/ in do_dump_extents()
1042 current_fs->blocksize) + 1; in do_dump_extents()
1045 physical_width = int_log10(ext2fs_blocks_count(current_fs->super)) + 1; in do_dump_extents()
1077 ext2fs_block_iterate3(current_fs, inode, BLOCK_FLAG_READ_ONLY, NULL, in do_blocks()
1091 retval = ext2fs_check_directory(current_fs, inode); in do_chroot()
1138 !ext2fs_test_inode_bitmap2(current_fs->inode_map,inode)) in do_freei()
1141 ext2fs_unmark_inode_bitmap2(current_fs->inode_map, inode++); in do_freei()
1142 ext2fs_mark_ib_dirty(current_fs); in do_freei()
1168 ext2fs_test_inode_bitmap2(current_fs->inode_map,inode)) in do_seti()
1171 ext2fs_mark_inode_bitmap2(current_fs->inode_map, inode++); in do_seti()
1172 ext2fs_mark_ib_dirty(current_fs); in do_seti()
1183 if (ext2fs_test_inode_bitmap2(current_fs->inode_map,inode)) in do_testi()
1200 if (!ext2fs_test_block_bitmap2(current_fs->block_map,block)) in do_freeb()
1203 ext2fs_unmark_block_bitmap2(current_fs->block_map,block); in do_freeb()
1206 ext2fs_mark_bb_dirty(current_fs); in do_freeb()
1219 if (ext2fs_test_block_bitmap2(current_fs->block_map,block)) in do_setb()
1222 ext2fs_mark_block_bitmap2(current_fs->block_map,block); in do_setb()
1225 ext2fs_mark_bb_dirty(current_fs); in do_setb()
1237 if (ext2fs_test_block_bitmap2(current_fs->block_map,block)) in do_testb()
1329 os = current_fs->super->s_creator_os; in do_modify_inode()
1399 retval = ext2fs_check_directory(current_fs, inode); in do_change_working_dir()
1417 retval = ext2fs_get_pathname(current_fs, cwd, 0, &pathname); in do_print_working_directory()
1428 retval = ext2fs_get_pathname(current_fs, root, 0, &pathname); in do_print_working_directory()
1466 if (! (retval=ext2fs_namei(current_fs, root, cwd, destname, &dir))) in make_link()
1489 retval = ext2fs_link(current_fs, dir, dest, ino, in make_link()
1536 if (ext2fs_test_inode_bitmap2(current_fs->inode_map, ino)) { in do_undel()
1551 ext2fs_block_iterate3(current_fs, ino, BLOCK_FLAG_READ_ONLY, NULL, in do_undel()
1554 ext2fs_inode_alloc_stats2(current_fs, ino, +1, 0); in do_undel()
1576 retval = ext2fs_unlink(current_fs, dir, base_name, 0, 0); in unlink_file_by_name()
1652 goal = current_fs->super->s_first_data_block; in do_find_free_block()
1657 retval = ext2fs_new_block2(current_fs, free_blk + 1, 0, in do_find_free_block()
1705 retval = ext2fs_new_inode(current_fs, dir, mode, 0, &free_inode); in do_find_free_inode()
1721 retval = do_write_internal(current_fs, cwd, argv[1], argv[2], root); in do_write()
1770 retval = do_mknod_internal(current_fs, cwd, argv[1], &st); in do_mknod()
1783 retval = do_mkdir_internal(current_fs, cwd, argv[1], root); in do_mkdir()
1808 inode_buf.i_dtime = current_fs->now ? current_fs->now : time(0); in kill_file_by_inode()
1811 if (ext2fs_inode_has_valid_blocks2(current_fs, &inode_buf)) { in kill_file_by_inode()
1812 ext2fs_block_iterate3(current_fs, inode, BLOCK_FLAG_READ_ONLY, in kill_file_by_inode()
1816 ext2fs_inode_alloc_stats2(current_fs, inode, -1, in kill_file_by_inode()
1841 retval = ext2fs_namei(current_fs, root, cwd, argv[1], &inode_num); in do_rm()
1903 retval = ext2fs_namei(current_fs, root, cwd, argv[1], &inode_num); in do_rmdir()
1920 retval = ext2fs_dir_iterate2(current_fs, inode_num, 0, in do_rmdir()
1952 if (current_fs) in do_show_debugfs_params()
1954 current_fs->flags & EXT2_FLAG_RW ? "write" : "only"); in do_show_debugfs_params()
1956 current_fs ? current_fs->device_name : "--none--"); in do_show_debugfs_params()
1968 retval = ext2fs_expand_dir(current_fs, inode); in do_expand_dir()
1985 ¤t_fs->super->s_feature_compat, 0)) in do_features()
1989 ext2fs_mark_super_dirty(current_fs); in do_features()
1991 print_features(current_fs->super, stdout); in do_features()
2045 errcode = ext2fs_bmap2(current_fs, ino, 0, 0, flags, blk, in do_bmap()
2070 group = (ino - 1) / EXT2_INODES_PER_GROUP(current_fs->super); in do_imap()
2071 offset = ((ino - 1) % EXT2_INODES_PER_GROUP(current_fs->super)) * in do_imap()
2072 EXT2_INODE_SIZE(current_fs->super); in do_imap()
2073 block = offset >> EXT2_BLOCK_SIZE_BITS(current_fs->super); in do_imap()
2074 if (!ext2fs_inode_table_loc(current_fs, (unsigned)group)) { in do_imap()
2079 block_nr = ext2fs_inode_table_loc(current_fs, (unsigned)group) + in do_imap()
2081 offset &= (EXT2_BLOCK_SIZE(current_fs->super) - 1); in do_imap()
2103 isize = EXT2_INODE_SIZE(current_fs->super); in do_idump()
2110 err = ext2fs_read_inode_full(current_fs, ino, in do_idump()
2139 current_fs->now = now; in do_set_current_time()
2235 errcode = ext2fs_punch(current_fs, ino, 0, 0, start, end); in do_punch()
2270 errcode = ext2fs_fallocate(current_fs, EXT2_FALLOCATE_INIT_BEYOND_EOF, in do_fallocate()
2290 retval = do_symlink_internal(current_fs, cwd, argv[1], argv[2], root); in do_symlink()
2316 mmp_block = current_fs->super->s_mmp_block; 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, mmp_block, 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()
2551 if (current_fs) in main()