Lines Matching refs:fs
54 ext2_filsys fs = ctx->fs;
63 init_resource_track(&rtrack, ctx->fs->io);
76 pctx.errcode = ext2fs_allocate_inode_bitmap(fs, _("inode done bitmap"),
134 print_resource_track(ctx, _("Pass 3"), &rtrack, ctx->fs->io);
143 ext2_filsys fs = ctx->fs;
176 pctx.errcode = ext2fs_new_block(fs, 0, ctx->block_found_map, &blk);
184 ext2fs_mark_block_bitmap(fs->block_map, blk);
185 ext2fs_mark_bb_dirty(fs);
190 pctx.errcode = ext2fs_new_dir_block(fs, EXT2_ROOT_INO, EXT2_ROOT_INO,
199 pctx.errcode = ext2fs_write_dir_block(fs, blk, block);
213 inode.i_size = fs->blocksize;
216 ext2fs_iblk_set(fs, &inode, 1);
222 pctx.errcode = ext2fs_write_new_inode(fs, EXT2_ROOT_INO, &inode);
239 ext2fs_mark_inode_bitmap(fs->inode_map, EXT2_ROOT_INO);
240 ext2fs_mark_ib_dirty(fs);
262 ext2_filsys fs = ctx->fs;
297 ext2fs_unmark_valid(fs);
320 pctx->errcode = ext2fs_allocate_inode_bitmap(fs, _("inode loop detection bitmap"), &inode_loop_detect);
356 ext2_filsys fs = ctx->fs;
370 retval = ext2fs_lookup(fs, EXT2_ROOT_INO, name,
388 pctx.errcode = ext2fs_unlink(fs, EXT2_ROOT_INO, name, ino, 0);
412 retval = ext2fs_new_block(fs, 0, ctx->block_found_map, &blk);
419 ext2fs_block_alloc_stats(fs, blk, +1);
424 retval = ext2fs_new_inode(fs, EXT2_ROOT_INO, 040700,
433 ext2fs_inode_alloc_stats2(fs, ino, +1, 1);
438 retval = ext2fs_new_dir_block(fs, ino, EXT2_ROOT_INO, &block);
445 retval = ext2fs_write_dir_block(fs, blk, block);
458 inode.i_size = fs->blocksize;
461 ext2fs_iblk_set(fs, &inode, 1);
467 pctx.errcode = ext2fs_write_new_inode(fs, ino, &inode);
476 pctx.errcode = ext2fs_link(fs, EXT2_ROOT_INO, name, ino, EXT2_FT_DIR);
502 ext2_filsys fs = ctx->fs;
522 if (ext2fs_read_inode(fs, ino, &inode) == 0)
524 retval = ext2fs_link(fs, ctx->lost_and_found, name, ino, file_type);
535 retval = ext2fs_link(fs, ctx->lost_and_found, name,
553 ext2_filsys fs = ctx->fs;
560 retval = ext2fs_read_inode(fs, ino, &inode);
583 retval = ext2fs_write_inode(fs, ino, &inode);
594 ext2_filsys fs;
628 if (fp->ctx->fs->super->s_feature_incompat &
641 ext2_filsys fs = ctx->fs;
646 fp.fs = fs;
657 retval = ext2fs_dir_iterate(fs, ino, DIRENT_FLAG_INCLUDE_EMPTY,
663 ext2fs_unmark_valid(fs);
686 static int expand_dir_proc(ext2_filsys fs,
711 retval = ext2fs_new_block(fs, last_blk, ctx->block_found_map,
718 retval = ext2fs_new_dir_block(fs, 0, 0, &block);
724 retval = ext2fs_write_dir_block(fs, new_blk, block);
726 retval = ext2fs_get_mem(fs->blocksize, &block);
731 memset(block, 0, fs->blocksize);
732 retval = io_channel_write_blk(fs->io, new_blk, 1, block);
741 ext2fs_block_alloc_stats(fs, new_blk, +1);
753 ext2_filsys fs = ctx->fs;
758 if (!(fs->flags & EXT2_FLAG_RW))
767 retval = ext2fs_check_directory(fs, dir);
778 retval = ext2fs_block_iterate2(fs, dir, BLOCK_FLAG_APPEND,
787 retval = ext2fs_read_inode(fs, dir, &inode);
791 inode.i_size = (es.last_block + 1) * fs->blocksize;
792 ext2fs_iblk_add_blocks(fs, &inode, es.newblocks);