Lines Matching refs:fs
34 static int swap_block(ext2_filsys fs, blk_t *block_nr, int blockcnt,
42 retval = ext2fs_read_dir_block(fs, *block_nr, sb->dir_buf);
47 retval = ext2fs_write_dir_block(fs, *block_nr, sb->dir_buf);
88 sb.dir_buf = block_buf + ctx->fs->blocksize*3;
94 retval = ext2fs_block_iterate(ctx->fs, ino, 0, block_buf,
112 ext2_filsys fs = ctx->fs;
122 retval = ext2fs_get_array(fs->blocksize, fs->inode_blocks_per_group,
130 block_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize * 4,
132 for (group = 0; group < fs->group_desc_count; group++) {
133 retval = io_channel_read_blk(fs->io,
134 fs->group_desc[group].bg_inode_table,
135 fs->inode_blocks_per_group, buf);
144 for (i=0; i < fs->super->s_inodes_per_group;
149 if (fs->flags & EXT2_FLAG_SWAP_BYTES_READ)
150 ext2fs_swap_inode(fs, inode, inode, 0);
168 if (fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE)
169 ext2fs_swap_inode(fs, inode, inode, 1);
171 retval = io_channel_write_blk(fs->io,
172 fs->group_desc[group].bg_inode_table,
173 fs->inode_blocks_per_group, buf);
188 ext2fs_flush_icache(fs);
218 ext2_filsys fs = ctx->fs;
232 if (fs->super->s_mnt_count) {
240 if (fs->flags & EXT2_FLAG_SWAP_BYTES) {
241 fs->flags &= ~(EXT2_FLAG_SWAP_BYTES|
243 fs->flags |= EXT2_FLAG_SWAP_BYTES_READ;
245 fs->flags &= ~EXT2_FLAG_SWAP_BYTES_READ;
246 fs->flags |= EXT2_FLAG_SWAP_BYTES_WRITE;
251 if (fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE)
252 fs->flags |= EXT2_FLAG_SWAP_BYTES;
253 fs->flags &= ~(EXT2_FLAG_SWAP_BYTES_READ|
258 ext2fs_swap_bitmap(fs->inode_map);
259 ext2fs_swap_bitmap(fs->block_map);
260 fs->flags |= EXT2_FLAG_BB_DIRTY | EXT2_FLAG_IB_DIRTY;
262 fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
263 ext2fs_flush(fs);
264 fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;