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