Lines Matching refs:error
313 int error; in xfs_da3_node_create() local
319 error = xfs_da_get_buf(tp, dp, blkno, -1, &bp, whichfork); in xfs_da3_node_create()
320 if (error) in xfs_da3_node_create()
321 return error; in xfs_da3_node_create()
362 int error; in xfs_da3_split() local
391 error = xfs_attr3_leaf_split(state, oldblk, newblk); in xfs_da3_split()
392 if ((error != 0) && (error != -ENOSPC)) { in xfs_da3_split()
393 return error; /* GROT: attr is inconsistent */ in xfs_da3_split()
395 if (!error) { in xfs_da3_split()
406 error = xfs_attr3_leaf_split(state, oldblk, in xfs_da3_split()
411 error = xfs_attr3_leaf_split(state, newblk, in xfs_da3_split()
414 if (error) in xfs_da3_split()
415 return error; /* GROT: attr inconsistent */ in xfs_da3_split()
419 error = xfs_dir2_leafn_split(state, oldblk, newblk); in xfs_da3_split()
420 if (error) in xfs_da3_split()
421 return error; in xfs_da3_split()
425 error = xfs_da3_node_split(state, oldblk, newblk, addblk, in xfs_da3_split()
428 if (error) in xfs_da3_split()
429 return error; /* GROT: dir is inconsistent */ in xfs_da3_split()
453 error = xfs_da3_root_split(state, oldblk, addblk); in xfs_da3_split()
454 if (error) { in xfs_da3_split()
456 return error; /* GROT: dir is inconsistent */ in xfs_da3_split()
524 int error; in xfs_da3_root_split() local
534 error = xfs_da_grow_inode(args, &blkno); in xfs_da3_root_split()
535 if (error) in xfs_da3_root_split()
536 return error; in xfs_da3_root_split()
540 error = xfs_da_get_buf(tp, dp, blkno, -1, &bp, args->whichfork); in xfs_da3_root_split()
541 if (error) in xfs_da3_root_split()
542 return error; in xfs_da3_root_split()
602 error = xfs_da3_node_create(args, in xfs_da3_root_split()
605 if (error) in xfs_da3_root_split()
606 return error; in xfs_da3_root_split()
651 int error; in xfs_da3_node_split() local
673 error = xfs_da_grow_inode(state->args, &blkno); in xfs_da3_node_split()
674 if (error) in xfs_da3_node_split()
675 return error; /* GROT: dir is inconsistent */ in xfs_da3_node_split()
677 error = xfs_da3_node_create(state->args, blkno, treelevel, in xfs_da3_node_split()
679 if (error) in xfs_da3_node_split()
680 return error; /* GROT: dir is inconsistent */ in xfs_da3_node_split()
684 error = xfs_da3_blk_link(state, oldblk, newblk); in xfs_da3_node_split()
685 if (error) in xfs_da3_node_split()
686 return error; in xfs_da3_node_split()
942 int error; in xfs_da3_join() local
966 error = xfs_attr3_leaf_toosmall(state, &action); in xfs_da3_join()
967 if (error) in xfs_da3_join()
968 return error; in xfs_da3_join()
974 error = xfs_dir2_leafn_toosmall(state, &action); in xfs_da3_join()
975 if (error) in xfs_da3_join()
976 return error; in xfs_da3_join()
988 error = xfs_da3_node_toosmall(state, &action); in xfs_da3_join()
989 if (error) in xfs_da3_join()
990 return error; in xfs_da3_join()
997 error = xfs_da3_blk_unlink(state, drop_blk, save_blk); in xfs_da3_join()
999 if (error) in xfs_da3_join()
1000 return error; in xfs_da3_join()
1001 error = xfs_da_shrink_inode(state->args, drop_blk->blkno, in xfs_da3_join()
1004 if (error) in xfs_da3_join()
1005 return error; in xfs_da3_join()
1014 error = xfs_da3_root_join(state, &state->path.blk[0]); in xfs_da3_join()
1015 return error; in xfs_da3_join()
1055 int error; in xfs_da3_root_join() local
1081 error = xfs_da3_node_read(args->trans, dp, child, -1, &bp, in xfs_da3_root_join()
1083 if (error) in xfs_da3_root_join()
1084 return error; in xfs_da3_root_join()
1103 error = xfs_da_shrink_inode(args, child, bp); in xfs_da3_root_join()
1104 return error; in xfs_da3_root_join()
1129 int error; in xfs_da3_node_toosmall() local
1163 error = xfs_da3_path_shift(state, &state->altpath, forward, in xfs_da3_node_toosmall()
1165 if (error) in xfs_da3_node_toosmall()
1166 return error; in xfs_da3_node_toosmall()
1196 error = xfs_da3_node_read(state->args->trans, dp, in xfs_da3_node_toosmall()
1198 if (error) in xfs_da3_node_toosmall()
1199 return error; in xfs_da3_node_toosmall()
1219 error = xfs_da3_path_shift(state, &state->altpath, forward, in xfs_da3_node_toosmall()
1222 error = xfs_da3_path_shift(state, &state->path, forward, in xfs_da3_node_toosmall()
1225 if (error) in xfs_da3_node_toosmall()
1226 return error; in xfs_da3_node_toosmall()
1468 int error; in xfs_da3_node_lookup_int() local
1486 error = xfs_da3_node_read(args->trans, args->dp, blkno, in xfs_da3_node_lookup_int()
1488 if (error) { in xfs_da3_node_lookup_int()
1491 return error; in xfs_da3_node_lookup_int()
1588 error = xfs_da3_path_shift(state, &state->path, 1, 1, in xfs_da3_node_lookup_int()
1590 if (error) in xfs_da3_node_lookup_int()
1591 return error; in xfs_da3_node_lookup_int()
1656 int error; in xfs_da3_blk_link() local
1693 error = xfs_da3_node_read(args->trans, dp, in xfs_da3_blk_link()
1696 if (error) in xfs_da3_blk_link()
1697 return error; in xfs_da3_blk_link()
1714 error = xfs_da3_node_read(args->trans, dp, in xfs_da3_blk_link()
1717 if (error) in xfs_da3_blk_link()
1718 return error; in xfs_da3_blk_link()
1748 int error; in xfs_da3_blk_unlink() local
1773 error = xfs_da3_node_read(args->trans, args->dp, in xfs_da3_blk_unlink()
1776 if (error) in xfs_da3_blk_unlink()
1777 return error; in xfs_da3_blk_unlink()
1790 error = xfs_da3_node_read(args->trans, args->dp, in xfs_da3_blk_unlink()
1793 if (error) in xfs_da3_blk_unlink()
1794 return error; in xfs_da3_blk_unlink()
1834 int error; in xfs_da3_path_shift() local
1878 error = xfs_da3_node_read(args->trans, dp, blkno, -1, &bp, in xfs_da3_path_shift()
1880 if (error) in xfs_da3_path_shift()
1881 return error; in xfs_da3_path_shift()
2016 int nmap, error, got, i, mapi; in xfs_da_grow_inode_int() local
2021 error = xfs_bmap_first_unused(tp, dp, count, bno, w); in xfs_da_grow_inode_int()
2022 if (error) in xfs_da_grow_inode_int()
2023 return error; in xfs_da_grow_inode_int()
2030 error = xfs_bmapi_write(tp, dp, *bno, count, in xfs_da_grow_inode_int()
2034 if (error) in xfs_da_grow_inode_int()
2035 return error; in xfs_da_grow_inode_int()
2053 error = xfs_bmapi_write(tp, dp, b, c, in xfs_da_grow_inode_int()
2057 if (error) in xfs_da_grow_inode_int()
2078 error = -ENOSPC; in xfs_da_grow_inode_int()
2088 return error; in xfs_da_grow_inode_int()
2101 int error; in xfs_da_grow_inode() local
2106 error = xfs_da_grow_inode_int(args, &bno, args->geo->fsbcount); in xfs_da_grow_inode()
2107 if (!error) in xfs_da_grow_inode()
2109 return error; in xfs_da_grow_inode()
2146 int error; in xfs_da3_swap_lastblock() local
2162 error = xfs_bmap_last_before(tp, dp, &lastoff, w); in xfs_da3_swap_lastblock()
2163 if (error) in xfs_da3_swap_lastblock()
2164 return error; in xfs_da3_swap_lastblock()
2174 error = xfs_da3_node_read(tp, dp, last_blkno, -1, &last_buf, w); in xfs_da3_swap_lastblock()
2175 if (error) in xfs_da3_swap_lastblock()
2176 return error; in xfs_da3_swap_lastblock()
2210 error = xfs_da3_node_read(tp, dp, sib_blkno, -1, &sib_buf, w); in xfs_da3_swap_lastblock()
2211 if (error) in xfs_da3_swap_lastblock()
2219 error = -EFSCORRUPTED; in xfs_da3_swap_lastblock()
2232 error = xfs_da3_node_read(tp, dp, sib_blkno, -1, &sib_buf, w); in xfs_da3_swap_lastblock()
2233 if (error) in xfs_da3_swap_lastblock()
2241 error = -EFSCORRUPTED; in xfs_da3_swap_lastblock()
2256 error = xfs_da3_node_read(tp, dp, par_blkno, -1, &par_buf, w); in xfs_da3_swap_lastblock()
2257 if (error) in xfs_da3_swap_lastblock()
2264 error = -EFSCORRUPTED; in xfs_da3_swap_lastblock()
2277 error = -EFSCORRUPTED; in xfs_da3_swap_lastblock()
2304 error = -EFSCORRUPTED; in xfs_da3_swap_lastblock()
2307 error = xfs_da3_node_read(tp, dp, par_blkno, -1, &par_buf, w); in xfs_da3_swap_lastblock()
2308 if (error) in xfs_da3_swap_lastblock()
2315 error = -EFSCORRUPTED; in xfs_da3_swap_lastblock()
2337 return error; in xfs_da3_swap_lastblock()
2350 int done, error, w, count; in xfs_da_shrink_inode() local
2364 error = xfs_bunmapi(tp, dp, dead_blkno, count, in xfs_da_shrink_inode()
2367 if (error == -ENOSPC) { in xfs_da_shrink_inode()
2370 error = xfs_da3_swap_lastblock(args, &dead_blkno, in xfs_da_shrink_inode()
2372 if (error) in xfs_da_shrink_inode()
2379 return error; in xfs_da_shrink_inode()
2469 int error = 0; in xfs_dabuf_map() local
2495 error = xfs_bmapi_read(dp, (xfs_fileoff_t)bno, nfsb, irecs, in xfs_dabuf_map()
2497 if (error) in xfs_dabuf_map()
2508 error = mappedbno == -2 ? -1 : -EFSCORRUPTED; in xfs_dabuf_map()
2509 if (unlikely(error == -EFSCORRUPTED)) { in xfs_dabuf_map()
2530 error = xfs_buf_map_from_irec(mp, map, nmaps, irecs, nirecs); in xfs_dabuf_map()
2534 return error; in xfs_dabuf_map()
2553 int error; in xfs_da_get_buf() local
2558 error = xfs_dabuf_map(dp, bno, mappedbno, whichfork, in xfs_da_get_buf()
2560 if (error) { in xfs_da_get_buf()
2562 if (error == -1) in xfs_da_get_buf()
2563 error = 0; in xfs_da_get_buf()
2569 error = bp ? bp->b_error : -EIO; in xfs_da_get_buf()
2570 if (error) { in xfs_da_get_buf()
2582 return error; in xfs_da_get_buf()
2602 int error; in xfs_da_read_buf() local
2607 error = xfs_dabuf_map(dp, bno, mappedbno, whichfork, in xfs_da_read_buf()
2609 if (error) { in xfs_da_read_buf()
2611 if (error == -1) in xfs_da_read_buf()
2612 error = 0; in xfs_da_read_buf()
2616 error = xfs_trans_read_buf_map(dp->i_mount, trans, in xfs_da_read_buf()
2619 if (error) in xfs_da_read_buf()
2631 return error; in xfs_da_read_buf()
2648 int error; in xfs_da_reada_buf() local
2652 error = xfs_dabuf_map(dp, bno, mappedbno, whichfork, in xfs_da_reada_buf()
2654 if (error) { in xfs_da_reada_buf()
2656 if (error == -1) in xfs_da_reada_buf()
2657 error = 0; in xfs_da_reada_buf()
2668 if (error) in xfs_da_reada_buf()