Home | History | Annotate | Download | only in ext2fs

Lines Matching refs:fs

44 static int set_bad_block_proc(ext2_filsys fs, blk_t *block_nr,
48 static int clear_bad_block_proc(ext2_filsys fs, blk_t *block_nr,
57 errcode_t ext2fs_update_bb_inode(ext2_filsys fs, ext2_badblocks_list bb_list)
63 EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
65 if (!fs->block_map)
75 retval = ext2fs_get_mem(fs->blocksize, &rec.block_buf);
78 memset(rec.block_buf, 0, fs->blocksize);
84 retval = ext2fs_block_iterate2(fs, EXT2_BAD_INO,
106 retval = ext2fs_block_iterate2(fs, EXT2_BAD_INO,
122 retval = ext2fs_read_inode(fs, EXT2_BAD_INO, &inode);
126 inode.i_atime = inode.i_mtime = fs->now ? fs->now : time(0);
128 inode.i_ctime = fs->now ? fs->now : time(0);
129 ext2fs_iblk_set(fs, &inode, rec.bad_block_count);
130 inode.i_size = rec.bad_block_count * fs->blocksize;
132 retval = ext2fs_write_inode(fs, EXT2_BAD_INO, &inode);
151 static int clear_bad_block_proc(ext2_filsys fs, blk_t *block_nr,
168 if (*block_nr >= ext2fs_blocks_count(fs->super) ||
169 *block_nr < fs->super->s_first_data_block) {
193 ext2fs_block_alloc_stats2(fs, *block_nr, -1);
208 static int set_bad_block_proc(ext2_filsys fs, blk_t *block_nr,
237 if (ext2fs_test_block_bitmap2(fs->block_map, blk))
240 retval = ext2fs_new_block(fs, 0, 0, &blk);
246 retval = io_channel_write_blk64(fs->io, blk, 1, rec->block_buf);
256 ext2fs_block_alloc_stats2(fs, blk, +1);