Lines Matching refs:retval

41 	errcode_t	retval;  in block_ind_bmap()  local
50 retval = io_channel_read_blk(fs->io, ind, 1, block_buf); in block_ind_bmap()
51 if (retval) in block_ind_bmap()
52 return retval; in block_ind_bmap()
71 retval = ext2fs_alloc_block(fs, b, in block_ind_bmap()
73 if (retval) in block_ind_bmap()
74 return retval; in block_ind_bmap()
82 retval = io_channel_write_blk(fs->io, ind, 1, block_buf); in block_ind_bmap()
83 if (retval) in block_ind_bmap()
84 return retval; in block_ind_bmap()
99 errcode_t retval; in block_dind_bmap() local
104 retval = block_ind_bmap(fs, flags & ~BMAP_SET, dind, block_buf, in block_dind_bmap()
106 if (retval) in block_dind_bmap()
107 return retval; in block_dind_bmap()
108 retval = block_ind_bmap(fs, flags, b, block_buf, blocks_alloc, in block_dind_bmap()
110 return retval; in block_dind_bmap()
119 errcode_t retval; in block_tind_bmap() local
124 retval = block_dind_bmap(fs, flags & ~BMAP_SET, tind, block_buf, in block_tind_bmap()
126 if (retval) in block_tind_bmap()
127 return retval; in block_tind_bmap()
128 retval = block_ind_bmap(fs, flags, b, block_buf, blocks_alloc, in block_tind_bmap()
130 return retval; in block_tind_bmap()
181 errcode_t retval; in ext2fs_map_cluster_block() local
189 retval = ext2fs_extent_open2(fs, ino, inode, &handle); in ext2fs_map_cluster_block()
190 if (retval) in ext2fs_map_cluster_block()
193 retval = implied_cluster_alloc(fs, ino, inode, handle, lblk, pblk); in ext2fs_map_cluster_block()
194 if (retval) in ext2fs_map_cluster_block()
200 return retval; in ext2fs_map_cluster_block()
213 errcode_t retval = 0; in extent_bmap() local
221 retval = ext2fs_extent_set_bmap(handle, block, in extent_bmap()
223 return retval; in extent_bmap()
225 retval = ext2fs_extent_goto(handle, block); in extent_bmap()
226 if (retval) { in extent_bmap()
228 if (retval == EXT2_ET_EXTENT_NOT_FOUND) { in extent_bmap()
232 return retval; in extent_bmap()
234 retval = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT, &extent); in extent_bmap()
235 if (retval) in extent_bmap()
236 return retval; in extent_bmap()
248 retval = extent_bmap(fs, ino, inode, handle, block_buf, in extent_bmap()
250 if (retval) in extent_bmap()
256 retval = ext2fs_alloc_block3(fs, blk64, block_buf, &blk64, in extent_bmap()
258 if (retval) in extent_bmap()
259 return retval; in extent_bmap()
264 retval = ext2fs_extent_set_bmap(handle, block, in extent_bmap()
266 if (retval) { in extent_bmap()
268 return retval; in extent_bmap()
271 retval = ext2fs_read_inode(fs, ino, inode); in extent_bmap()
272 if (retval) in extent_bmap()
273 return retval; in extent_bmap()
312 errcode_t retval = 0; in ext2fs_bmap2() local
329 retval = ext2fs_read_inode(fs, ino, &inode_buf); in ext2fs_bmap2()
330 if (retval) in ext2fs_bmap2()
331 return retval; in ext2fs_bmap2()
347 retval = ext2fs_get_array(2, fs->blocksize, &buf); in ext2fs_bmap2()
348 if (retval) in ext2fs_bmap2()
349 return retval; in ext2fs_bmap2()
354 retval = ext2fs_extent_open2(fs, ino, inode, &handle); in ext2fs_bmap2()
355 if (retval) in ext2fs_bmap2()
357 retval = extent_bmap(fs, ino, inode, handle, block_buf, in ext2fs_bmap2()
377 retval = ext2fs_alloc_block3(fs, b64, block_buf, &b64, in ext2fs_bmap2()
380 if (retval) in ext2fs_bmap2()
397 retval = EXT2_ET_SET_BMAP_NO_IND; in ext2fs_bmap2()
403 retval = ext2fs_alloc_block3(fs, b64, block_buf, &b64, in ext2fs_bmap2()
406 if (retval) in ext2fs_bmap2()
411 retval = block_ind_bmap(fs, bmap_flags, b, block_buf, in ext2fs_bmap2()
413 if (retval == 0) in ext2fs_bmap2()
425 retval = EXT2_ET_SET_BMAP_NO_IND; in ext2fs_bmap2()
431 retval = ext2fs_alloc_block3(fs, b64, block_buf, &b64, in ext2fs_bmap2()
434 if (retval) in ext2fs_bmap2()
439 retval = block_dind_bmap(fs, bmap_flags, b, block_buf, in ext2fs_bmap2()
441 if (retval == 0) in ext2fs_bmap2()
452 retval = EXT2_ET_SET_BMAP_NO_IND; in ext2fs_bmap2()
458 retval = ext2fs_alloc_block3(fs, b64, block_buf, &b64, in ext2fs_bmap2()
461 if (retval) in ext2fs_bmap2()
466 retval = block_tind_bmap(fs, bmap_flags, b, block_buf, in ext2fs_bmap2()
468 if (retval == 0) in ext2fs_bmap2()
471 if (*phys_blk && retval == 0 && (bmap_flags & BMAP_ZERO)) in ext2fs_bmap2()
472 retval = ext2fs_zero_blocks2(fs, *phys_blk, 1, NULL, NULL); in ext2fs_bmap2()
477 if ((retval == 0) && (blocks_alloc || inode_dirty)) { in ext2fs_bmap2()
479 retval = ext2fs_write_inode(fs, ino, inode); in ext2fs_bmap2()
481 return retval; in ext2fs_bmap2()