Lines Matching refs:fs
50 ext2_filsys fs = ctx->fs;
55 if (!fs)
57 if (fs->io && fs->super) {
58 ext2fs_mmp_stop(ctx->fs);
59 if (ctx->fs->io->magic == EXT2_ET_MAGIC_IO_CHANNEL)
60 io_channel_flush(ctx->fs->io);
64 if (ext2fs_test_changed(fs)) {
71 if (!ext2fs_test_valid(fs)) {
265 ext2_filsys fs = ctx->fs;
278 e2fsck_set_bitmap_type(fs, EXT2FS_BMAP64_RBTREE, "fs_bitmaps",
280 retval = ext2fs_read_bitmaps(fs);
281 fs->default_bitmap_type = save_type;
293 ext2_filsys fs = ctx->fs;
298 retval = ext2fs_write_bitmaps(fs);
310 ext2_filsys fs = ctx->fs;
318 if (fs != NULL) {
319 fs->super->s_state |= EXT2_ERROR_FS;
320 ext2fs_mark_super_dirty(fs);
321 ext2fs_close(fs);
443 retval = ext2fs_read_inode(ctx->fs, ino, inode);
457 retval = ext2fs_read_inode_full(ctx->fs, ino, inode, bufsize);
471 retval = ext2fs_write_inode_full(ctx->fs, ino, inode, bufsize);
484 retval = ext2fs_write_inode(ctx->fs, ino, inode);
503 blk64_t get_backup_sb(e2fsck_t ctx, ext2_filsys fs, const char *name,
512 if (fs && fs->super) {
513 ret_sb = (fs->super->s_blocks_per_group +
514 fs->super->s_first_data_block);
517 ctx->blocksize = fs->blocksize;
616 errcode_t e2fsck_zero_blocks(ext2_filsys fs, blk_t blk, int num,
623 /* If fs is null, clean up the static buffer and return */
624 if (!fs) {
633 buf = malloc(fs->blocksize * STRIDE_LENGTH);
639 memset(buf, 0, fs->blocksize * STRIDE_LENGTH);
646 retval = io_channel_write_blk64(fs->io, blk, count, buf);
777 errcode_t e2fsck_mmp_update(ext2_filsys fs)
781 retval = ext2fs_mmp_update(fs);
783 dump_mmp_msg(fs->mmp_cmp,
790 void e2fsck_set_bitmap_type(ext2_filsys fs, unsigned int default_type,
796 *old_type = fs->default_bitmap_type;
802 fs->default_bitmap_type = type ? type : default_type;
804 fs->default_bitmap_type = default_type;
808 errcode_t e2fsck_allocate_inode_bitmap(ext2_filsys fs, const char *descr,
816 e2fsck_set_bitmap_type(fs, deftype, name, &save_type);
817 retval = ext2fs_allocate_inode_bitmap(fs, descr, ret);
818 fs->default_bitmap_type = save_type;
822 errcode_t e2fsck_allocate_block_bitmap(ext2_filsys fs, const char *descr,
830 e2fsck_set_bitmap_type(fs, deftype, name, &save_type);
831 retval = ext2fs_allocate_block_bitmap(fs, descr, ret);
832 fs->default_bitmap_type = save_type;
836 errcode_t e2fsck_allocate_subcluster_bitmap(ext2_filsys fs, const char *descr,
844 e2fsck_set_bitmap_type(fs, deftype, name, &save_type);
845 retval = ext2fs_allocate_subcluster_bitmap(fs, descr, ret);
846 fs->default_bitmap_type = save_type;