Lines Matching refs:retval
222 errcode_t retval; in ext2fs_extent_open2() local
232 retval = ext2fs_get_mem(sizeof(struct ext2_extent_handle), &handle); in ext2fs_extent_open2()
233 if (retval) in ext2fs_extent_open2()
234 return retval; in ext2fs_extent_open2()
244 retval = ext2fs_read_inode(fs, ino, handle->inode); in ext2fs_extent_open2()
245 if (retval) in ext2fs_extent_open2()
265 retval = EXT2_ET_INODE_NOT_EXTENT; in ext2fs_extent_open2()
269 retval = ext2fs_extent_header_verify(eh, sizeof(handle->inode->i_block)); in ext2fs_extent_open2()
270 if (retval) in ext2fs_extent_open2()
277 retval = ext2fs_get_memzero(handle->max_paths * in ext2fs_extent_open2()
298 return retval; in ext2fs_extent_open2()
312 errcode_t retval; in ext2fs_extent_get() local
463 retval = ext2fs_get_mem(handle->fs->blocksize, in ext2fs_extent_get()
465 if (retval) in ext2fs_extent_get()
466 return retval; in ext2fs_extent_get()
474 retval = io_channel_read_blk64(handle->fs->io, in ext2fs_extent_get()
476 if (retval) in ext2fs_extent_get()
477 return retval; in ext2fs_extent_get()
483 retval = ext2fs_extent_header_verify(eh, handle->fs->blocksize); in ext2fs_extent_get()
484 if (retval) { in ext2fs_extent_get()
486 return retval; in ext2fs_extent_get()
585 errcode_t retval; in update_path() local
590 retval = ext2fs_write_inode(handle->fs, handle->ino, in update_path()
600 retval = ext2fs_extent_block_csum_set(handle->fs, handle->ino, in update_path()
602 if (retval) in update_path()
603 return retval; in update_path()
605 retval = io_channel_write_blk64(handle->fs->io, in update_path()
608 return retval; in update_path()
618 errcode_t retval;
620 retval = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT, &extent);
621 if (retval)
622 return retval;
624 retval = ext2fs_extent_get_info(handle, &info);
625 if (retval)
626 return retval;
628 retval = ext2fs_get_mem(sizeof(struct ext2_extent_path), &save_path);
629 if (retval)
630 return retval;
663 errcode_t retval; in ext2fs_extent_goto2() local
665 retval = ext2fs_extent_get(handle, EXT2_EXTENT_ROOT, &extent); in ext2fs_extent_goto2()
666 if (retval) { in ext2fs_extent_goto2()
667 if (retval == EXT2_ET_EXTENT_NO_NEXT) in ext2fs_extent_goto2()
668 retval = EXT2_ET_EXTENT_NOT_FOUND; in ext2fs_extent_goto2()
669 return retval; in ext2fs_extent_goto2()
695 retval = ext2fs_extent_get(handle, in ext2fs_extent_goto2()
700 retval = ext2fs_extent_get(handle, in ext2fs_extent_goto2()
703 if (retval == EXT2_ET_EXTENT_NO_NEXT) in ext2fs_extent_goto2()
705 if (retval) in ext2fs_extent_goto2()
706 return retval; in ext2fs_extent_goto2()
710 retval = ext2fs_extent_get(handle, EXT2_EXTENT_NEXT_SIB, in ext2fs_extent_goto2()
712 if (retval == EXT2_ET_EXTENT_NO_NEXT) in ext2fs_extent_goto2()
714 if (retval) in ext2fs_extent_goto2()
715 return retval; in ext2fs_extent_goto2()
725 retval = ext2fs_extent_get(handle, EXT2_EXTENT_PREV_SIB, in ext2fs_extent_goto2()
727 if (retval) in ext2fs_extent_goto2()
728 return retval; in ext2fs_extent_goto2()
735 retval = ext2fs_extent_get(handle, EXT2_EXTENT_DOWN, in ext2fs_extent_goto2()
737 if (retval) in ext2fs_extent_goto2()
738 return retval; in ext2fs_extent_goto2()
770 int retval = 0; in ext2fs_extent_fix_parents() local
789 retval = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT, &extent); in ext2fs_extent_fix_parents()
790 if (retval) in ext2fs_extent_fix_parents()
796 if ((retval = ext2fs_extent_get_info(handle, &info))) in ext2fs_extent_fix_parents()
797 return retval; in ext2fs_extent_fix_parents()
803 retval = ext2fs_extent_get(handle, EXT2_EXTENT_UP, &extent); in ext2fs_extent_fix_parents()
804 if (retval) in ext2fs_extent_fix_parents()
811 retval = ext2fs_extent_replace(handle, 0, &extent); in ext2fs_extent_fix_parents()
812 if (retval) in ext2fs_extent_fix_parents()
818 retval = ext2fs_extent_goto2(handle, orig_height, start); in ext2fs_extent_fix_parents()
820 return retval; in ext2fs_extent_fix_parents()
902 errcode_t retval = 0; in extent_node_split() local
929 retval = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT, &extent); in extent_node_split()
930 if (retval) in extent_node_split()
933 retval = ext2fs_extent_get_info(handle, &info); in extent_node_split()
934 if (retval) in extent_node_split()
970 retval = ext2fs_extent_get(handle, EXT2_EXTENT_UP, &extent); in extent_node_split()
971 if (retval) in extent_node_split()
974 retval = extent_node_split(handle, expand_allowed); in extent_node_split()
975 if (retval) in extent_node_split()
979 retval = ext2fs_extent_goto2(handle, orig_height, orig_lblk); in extent_node_split()
980 if (retval) in extent_node_split()
1004 retval = ext2fs_get_memzero((handle->max_paths + 1) * in extent_node_split()
1007 if (retval) in extent_node_split()
1026 retval = EXT2_ET_CANT_SPLIT_EXTENT; in extent_node_split()
1033 retval = ENOMEM; in extent_node_split()
1040 retval = ext2fs_alloc_block2(handle->fs, goal_blk, block_buf, in extent_node_split()
1042 if (retval) in extent_node_split()
1068 retval = ext2fs_extent_block_csum_set(handle->fs, handle->ino, neweh); in extent_node_split()
1069 if (retval) in extent_node_split()
1073 retval = io_channel_write_blk64(handle->fs->io, new_node_pblk, 1, in extent_node_split()
1076 if (retval) in extent_node_split()
1100 retval = update_path(handle); in extent_node_split()
1101 if (retval) in extent_node_split()
1106 retval = ext2fs_extent_get(handle, EXT2_EXTENT_FIRST_SIB, &extent); in extent_node_split()
1107 if (retval) in extent_node_split()
1113 retval = ext2fs_extent_replace(handle, 0, &extent); in extent_node_split()
1114 if (retval) in extent_node_split()
1119 retval = ext2fs_extent_get(handle, EXT2_EXTENT_UP, &extent); in extent_node_split()
1123 retval = ext2fs_extent_replace(handle, 0, &extent); in extent_node_split()
1124 if (retval) in extent_node_split()
1131 retval = ext2fs_extent_insert(handle, EXT2_EXTENT_INSERT_AFTER, &extent); in extent_node_split()
1132 if (retval) in extent_node_split()
1137 retval = ext2fs_extent_goto2(handle, orig_height, orig_lblk); in extent_node_split()
1138 if (retval) in extent_node_split()
1143 retval = ext2fs_write_inode(handle->fs, handle->ino, in extent_node_split()
1145 if (retval) in extent_node_split()
1153 return retval; in extent_node_split()
1167 errcode_t retval; in ext2fs_extent_insert() local
1192 retval = extent_node_split(handle, 1); in ext2fs_extent_insert()
1193 if (retval) in ext2fs_extent_insert()
1194 return retval; in ext2fs_extent_insert()
1222 retval = ext2fs_extent_replace(handle, 0, extent); in ext2fs_extent_insert()
1223 if (retval) in ext2fs_extent_insert()
1226 retval = update_path(handle); in ext2fs_extent_insert()
1227 if (retval) in ext2fs_extent_insert()
1234 return retval; in ext2fs_extent_insert()
1262 errcode_t ec, retval = 0; in ext2fs_extent_set_bmap() local
1309 retval = ext2fs_extent_insert(handle, 0, &newextent); in ext2fs_extent_set_bmap()
1310 return retval; in ext2fs_extent_set_bmap()
1314 if ((retval = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT, in ext2fs_extent_set_bmap()
1316 if (retval != EXT2_ET_NO_CURRENT_NODE) in ext2fs_extent_set_bmap()
1317 return retval; in ext2fs_extent_set_bmap()
1320 if ((retval = ext2fs_extent_get_info(handle, &info))) in ext2fs_extent_set_bmap()
1321 return retval; in ext2fs_extent_set_bmap()
1326 retval = ext2fs_extent_goto(handle, logical); in ext2fs_extent_set_bmap()
1327 if (retval) { in ext2fs_extent_set_bmap()
1328 if (retval == EXT2_ET_EXTENT_NOT_FOUND) { in ext2fs_extent_set_bmap()
1329 retval = 0; in ext2fs_extent_set_bmap()
1348 retval = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT, &extent); in ext2fs_extent_set_bmap()
1349 if (retval) in ext2fs_extent_set_bmap()
1353 retval = ext2fs_extent_get(handle, EXT2_EXTENT_NEXT_LEAF, &next_extent); in ext2fs_extent_set_bmap()
1354 if (retval) { in ext2fs_extent_set_bmap()
1356 if (retval != EXT2_ET_EXTENT_NO_NEXT) in ext2fs_extent_set_bmap()
1365 retval = ext2fs_extent_goto(handle, logical); in ext2fs_extent_set_bmap()
1366 if (retval && retval != EXT2_ET_EXTENT_NOT_FOUND) in ext2fs_extent_set_bmap()
1368 retval = ext2fs_extent_get(handle, EXT2_EXTENT_PREV_LEAF, &prev_extent); in ext2fs_extent_set_bmap()
1369 if (retval) { in ext2fs_extent_set_bmap()
1371 if (retval != EXT2_ET_EXTENT_NO_PREV) in ext2fs_extent_set_bmap()
1380 retval = ext2fs_extent_goto(handle, logical); in ext2fs_extent_set_bmap()
1381 if (retval && retval != EXT2_ET_EXTENT_NOT_FOUND) in ext2fs_extent_set_bmap()
1402 retval = ext2fs_extent_replace(handle, 0, &extent); in ext2fs_extent_set_bmap()
1410 retval = ext2fs_extent_replace(handle, 0, &extent); in ext2fs_extent_set_bmap()
1416 retval = ext2fs_extent_get(handle, in ext2fs_extent_set_bmap()
1419 if (retval) in ext2fs_extent_set_bmap()
1424 retval = ext2fs_extent_replace(handle, 0, &next_extent); in ext2fs_extent_set_bmap()
1426 retval = ext2fs_extent_insert(handle, 0, &newextent); in ext2fs_extent_set_bmap()
1428 retval = ext2fs_extent_insert(handle, in ext2fs_extent_set_bmap()
1430 if (retval) in ext2fs_extent_set_bmap()
1432 retval = ext2fs_extent_fix_parents(handle); in ext2fs_extent_set_bmap()
1433 if (retval) in ext2fs_extent_set_bmap()
1440 retval = ext2fs_extent_replace(handle, 0, &newextent); in ext2fs_extent_set_bmap()
1442 retval = ext2fs_extent_delete(handle, 0); in ext2fs_extent_set_bmap()
1443 if (retval) in ext2fs_extent_set_bmap()
1447 retval = ec; in ext2fs_extent_set_bmap()
1450 if (retval) in ext2fs_extent_set_bmap()
1462 retval = ext2fs_extent_get(handle, in ext2fs_extent_set_bmap()
1464 if (retval) in ext2fs_extent_set_bmap()
1469 retval = ext2fs_extent_replace(handle, 0, in ext2fs_extent_set_bmap()
1471 if (retval) in ext2fs_extent_set_bmap()
1474 retval = ext2fs_extent_insert(handle, in ext2fs_extent_set_bmap()
1476 if (retval) in ext2fs_extent_set_bmap()
1478 retval = ext2fs_extent_fix_parents(handle); in ext2fs_extent_set_bmap()
1479 if (retval) in ext2fs_extent_set_bmap()
1487 retval = ext2fs_extent_goto(handle, logical); in ext2fs_extent_set_bmap()
1488 if (retval) in ext2fs_extent_set_bmap()
1490 retval = ext2fs_extent_get(handle, in ext2fs_extent_set_bmap()
1493 if (retval) in ext2fs_extent_set_bmap()
1497 retval = ext2fs_extent_replace(handle, 0, &extent); in ext2fs_extent_set_bmap()
1498 if (retval) in ext2fs_extent_set_bmap()
1512 retval = ext2fs_extent_get(handle, in ext2fs_extent_set_bmap()
1514 if (retval) in ext2fs_extent_set_bmap()
1517 retval = ext2fs_extent_replace(handle, 0, in ext2fs_extent_set_bmap()
1520 retval = ext2fs_extent_insert(handle, in ext2fs_extent_set_bmap()
1522 if (retval) in ext2fs_extent_set_bmap()
1524 retval = ext2fs_extent_fix_parents(handle); in ext2fs_extent_set_bmap()
1525 if (retval) in ext2fs_extent_set_bmap()
1527 retval = ext2fs_extent_get(handle, in ext2fs_extent_set_bmap()
1530 if (retval) in ext2fs_extent_set_bmap()
1536 retval = ext2fs_extent_replace(handle, 0, &extent); in ext2fs_extent_set_bmap()
1537 if (retval) in ext2fs_extent_set_bmap()
1539 retval = ext2fs_extent_fix_parents(handle); in ext2fs_extent_set_bmap()
1540 if (retval) in ext2fs_extent_set_bmap()
1558 retval = ext2fs_extent_replace(handle, 0, &extent); in ext2fs_extent_set_bmap()
1559 if (retval) in ext2fs_extent_set_bmap()
1564 retval = ext2fs_extent_insert(handle, in ext2fs_extent_set_bmap()
1566 if (retval) { in ext2fs_extent_set_bmap()
1578 retval = ext2fs_extent_insert(handle, in ext2fs_extent_set_bmap()
1580 if (retval) { in ext2fs_extent_set_bmap()
1600 return retval; in ext2fs_extent_set_bmap()
1608 errcode_t retval = 0; in ext2fs_extent_delete() local
1622 retval = ext2fs_extent_get(handle, EXT2_EXTENT_CURRENT, in ext2fs_extent_delete()
1624 if (retval == 0) { in ext2fs_extent_delete()
1658 retval = ext2fs_extent_get(handle, EXT2_EXTENT_UP, in ext2fs_extent_delete()
1660 if (retval) in ext2fs_extent_delete()
1661 return retval; in ext2fs_extent_delete()
1663 retval = ext2fs_extent_delete(handle, flags); in ext2fs_extent_delete()
1667 retval = ext2fs_write_inode(handle->fs, handle->ino, in ext2fs_extent_delete()
1679 retval = update_path(handle); in ext2fs_extent_delete()
1681 return retval; in ext2fs_extent_delete()