Lines Matching refs:fs
85 static int process_pass1b_block(ext2_filsys fs, blk_t *blocknr,
211 ext2_filsys fs = ctx->fs;
219 pctx.errcode = ext2fs_allocate_inode_bitmap(fs,
232 init_resource_track(&rtrack, ctx->fs->io);
234 print_resource_track(ctx, "Pass 1b", &rtrack, ctx->fs->io);
236 init_resource_track(&rtrack, ctx->fs->io);
238 print_resource_track(ctx, "Pass 1c", &rtrack, ctx->fs->io);
240 init_resource_track(&rtrack, ctx->fs->io);
242 print_resource_track(ctx, "Pass 1d", &rtrack, ctx->fs->io);
266 ext2_filsys fs = ctx->fs;
277 pctx.errcode = ext2fs_open_inode_scan(fs, ctx->inode_buffer_blocks,
310 pctx.errcode = ext2fs_block_iterate2(fs, ino,
314 process_pass1b_block(fs, &inode.i_file_acl,
318 if (ino >= EXT2_FIRST_INODE(fs->super) ||
329 static int process_pass1b_block(ext2_filsys fs EXT2FS_ATTR((unused)),
407 ext2_filsys fs = ctx->fs;
421 sd.first_inode = EXT2_FIRST_INODE(fs->super);
422 sd.max_inode = fs->super->s_inodes_count;
423 ext2fs_dblist_dir_iterate(fs->dblist, 0, block_buf,
429 ext2_filsys fs = ctx->fs;
539 ext2fs_unmark_valid(fs);
556 static int delete_file_block(ext2_filsys fs,
585 ext2fs_block_alloc_stats(fs, *block_nr, -1);
594 ext2_filsys fs = ctx->fs;
608 pctx.errcode = ext2fs_block_iterate2(fs, ino, BLOCK_FLAG_READ_ONLY,
614 ext2fs_inode_alloc_stats2(fs, ino, -1, LINUX_S_ISDIR(inode.i_mode));
620 (fs->super->s_feature_compat & EXT2_FEATURE_COMPAT_EXT_ATTR)) {
622 pctx.errcode = ext2fs_adjust_ea_refcount(fs, inode.i_file_acl,
641 delete_file_block(fs, &inode.i_file_acl,
653 static int clone_file_block(ext2_filsys fs,
676 retval = ext2fs_new_block(fs, 0, ctx->block_found_map,
683 retval = ext2fs_set_dir_block(fs->dblist,
694 retval = io_channel_read_blk(fs->io, *block_nr, 1,
700 retval = io_channel_write_blk(fs->io, new_block, 1,
710 ext2fs_mark_block_bitmap(fs->block_map, new_block);
723 ext2_filsys fs = ctx->fs;
737 retval = ext2fs_get_mem(fs->blocksize, &cs.buf);
747 pctx.errcode = ext2fs_block_iterate2(fs, ino, 0, block_buf,
749 ext2fs_mark_bb_dirty(fs);
764 if (blk && (clone_file_block(fs, &dp->inode.i_file_acl,
815 ext2_filsys fs = ctx->fs;
819 first_block = fs->super->s_first_data_block;
820 for (i = 0; i < fs->group_desc_count; i++) {
823 if (ext2fs_bg_has_super(fs, i)) {
825 (test_block <= first_block + fs->desc_blocks))
830 if ((fs->group_desc[i].bg_inode_table) &&
831 (test_block >= fs->group_desc[i].bg_inode_table) &&
832 (test_block < (fs->group_desc[i].bg_inode_table +
833 fs->inode_blocks_per_group)))
837 if ((test_block == fs->group_desc[i].bg_block_bitmap) ||
838 (test_block == fs->group_desc[i].bg_inode_bitmap))
841 first_block += fs->super->s_blocks_per_group;