Home | History | Annotate | Download | only in ext2fs

Lines Matching refs:fs

28 extern errcode_t ext2fs_bmap(ext2_filsys fs, ext2_ino_t ino,
35 static _BMAP_INLINE_ errcode_t block_ind_bmap(ext2_filsys fs, int flags,
49 retval = io_channel_read_blk(fs->io, ind, 1, block_buf);
59 return io_channel_write_blk(fs->io, ind, 1, block_buf);
70 retval = ext2fs_alloc_block(fs, b,
71 block_buf + fs->blocksize, &b);
81 retval = io_channel_write_blk(fs->io, ind, 1, block_buf);
92 static _BMAP_INLINE_ errcode_t block_dind_bmap(ext2_filsys fs, int flags,
101 addr_per_block = (blk_t) fs->blocksize >> 2;
103 retval = block_ind_bmap(fs, flags & ~BMAP_SET, dind, block_buf,
107 retval = block_ind_bmap(fs, flags, b, block_buf, blocks_alloc,
112 static _BMAP_INLINE_ errcode_t block_tind_bmap(ext2_filsys fs, int flags,
121 addr_per_block = (blk_t) fs->blocksize >> 2;
123 retval = block_dind_bmap(fs, flags & ~BMAP_SET, tind, block_buf,
127 retval = block_ind_bmap(fs, flags, b, block_buf, blocks_alloc,
132 static errcode_t extent_bmap(ext2_filsys fs, ext2_ino_t ino,
139 static errcode_t implied_cluster_alloc(ext2_filsys fs, ext2_ino_t ino,
147 if (!EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
151 base_block = lblk & ~EXT2FS_CLUSTER_MASK(fs);
161 for (i = 0; i < EXT2FS_CLUSTER_RATIO(fs); i++) {
164 extent_bmap(fs, ino, inode, handle, 0, 0,
176 errcode_t ext2fs_map_cluster_block(ext2_filsys fs, ext2_ino_t ino,
185 if (!EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
190 retval = ext2fs_extent_open2(fs, ino, inode, &handle);
194 retval = implied_cluster_alloc(fs, ino, inode, handle, lblk, pblk);
204 static errcode_t extent_bmap(ext2_filsys fs, ext2_ino_t ino,
240 implied_cluster_alloc(fs, ino, inode, handle, block, &blk64);
243 retval = extent_bmap(fs, ino, inode, handle, block_buf,
247 retval = ext2fs_alloc_block2(fs, blk64, block_buf,
251 blk64 &= ~EXT2FS_CLUSTER_MASK(fs);
252 blk64 += EXT2FS_CLUSTER_MASK(fs) & block;
260 retval = ext2fs_read_inode(fs, ino, inode);
269 int ext2fs_file_block_offset_too_big(ext2_filsys fs,
282 addr_per_block = fs->blocksize >> 2;
291 errcode_t ext2fs_bmap2(ext2_filsys fs, ext2_ino_t ino, struct ext2_inode *inode,
311 retval = ext2fs_read_inode(fs, ino, &inode_buf);
316 addr_per_block = (blk_t) fs->blocksize >> 2;
318 if (ext2fs_file_block_offset_too_big(fs, inode, block))
322 retval = ext2fs_get_array(2, fs->blocksize, &buf);
329 retval = ext2fs_extent_open2(fs, ino, inode, &handle);
332 retval = extent_bmap(fs, ino, inode, handle, block_buf,
350 retval = ext2fs_alloc_block(fs, b, block_buf, &b);
373 retval = ext2fs_alloc_block(fs, b, block_buf, &b);
379 retval = block_ind_bmap(fs, bmap_flags, b, block_buf,
398 retval = ext2fs_alloc_block(fs, b, block_buf, &b);
404 retval = block_dind_bmap(fs, bmap_flags, b, block_buf,
422 retval = ext2fs_alloc_block(fs, b, block_buf, &b);
428 retval = block_tind_bmap(fs, bmap_flags, b, block_buf,
438 ext2fs_iblk_add_blocks(fs, inode, blocks_alloc);
439 retval = ext2fs_write_inode(fs, ino, inode);
444 errcode_t ext2fs_bmap(ext2_filsys fs, ext2_ino_t ino, struct ext2_inode *inode,
451 ret = ext2fs_bmap2(fs, ino, inode, block_buf, bmap_flags, block,