Lines Matching refs:error

308 	int			error;  in xfs_da3_node_create()  local
314 error = xfs_da_get_buf(tp, dp, blkno, -1, &bp, whichfork); in xfs_da3_node_create()
315 if (error) in xfs_da3_node_create()
316 return error; in xfs_da3_node_create()
356 int error; in xfs_da3_split() local
385 error = xfs_attr3_leaf_split(state, oldblk, newblk); in xfs_da3_split()
386 if ((error != 0) && (error != -ENOSPC)) { in xfs_da3_split()
387 return error; /* GROT: attr is inconsistent */ in xfs_da3_split()
389 if (!error) { in xfs_da3_split()
400 error = xfs_attr3_leaf_split(state, oldblk, in xfs_da3_split()
405 error = xfs_attr3_leaf_split(state, newblk, in xfs_da3_split()
408 if (error) in xfs_da3_split()
409 return error; /* GROT: attr inconsistent */ in xfs_da3_split()
413 error = xfs_dir2_leafn_split(state, oldblk, newblk); in xfs_da3_split()
414 if (error) in xfs_da3_split()
415 return error; in xfs_da3_split()
419 error = xfs_da3_node_split(state, oldblk, newblk, addblk, in xfs_da3_split()
422 if (error) in xfs_da3_split()
423 return error; /* GROT: dir is inconsistent */ in xfs_da3_split()
447 error = xfs_da3_root_split(state, oldblk, addblk); in xfs_da3_split()
448 if (error) { in xfs_da3_split()
450 return error; /* GROT: dir is inconsistent */ in xfs_da3_split()
518 int error; in xfs_da3_root_split() local
528 error = xfs_da_grow_inode(args, &blkno); in xfs_da3_root_split()
529 if (error) in xfs_da3_root_split()
530 return error; in xfs_da3_root_split()
534 error = xfs_da_get_buf(tp, dp, blkno, -1, &bp, args->whichfork); in xfs_da3_root_split()
535 if (error) in xfs_da3_root_split()
536 return error; in xfs_da3_root_split()
596 error = xfs_da3_node_create(args, in xfs_da3_root_split()
599 if (error) in xfs_da3_root_split()
600 return error; in xfs_da3_root_split()
645 int error; in xfs_da3_node_split() local
667 error = xfs_da_grow_inode(state->args, &blkno); in xfs_da3_node_split()
668 if (error) in xfs_da3_node_split()
669 return error; /* GROT: dir is inconsistent */ in xfs_da3_node_split()
671 error = xfs_da3_node_create(state->args, blkno, treelevel, in xfs_da3_node_split()
673 if (error) in xfs_da3_node_split()
674 return error; /* GROT: dir is inconsistent */ in xfs_da3_node_split()
678 error = xfs_da3_blk_link(state, oldblk, newblk); in xfs_da3_node_split()
679 if (error) in xfs_da3_node_split()
680 return error; in xfs_da3_node_split()
936 int error; in xfs_da3_join() local
960 error = xfs_attr3_leaf_toosmall(state, &action); in xfs_da3_join()
961 if (error) in xfs_da3_join()
962 return error; in xfs_da3_join()
968 error = xfs_dir2_leafn_toosmall(state, &action); in xfs_da3_join()
969 if (error) in xfs_da3_join()
970 return error; in xfs_da3_join()
982 error = xfs_da3_node_toosmall(state, &action); in xfs_da3_join()
983 if (error) in xfs_da3_join()
984 return error; in xfs_da3_join()
991 error = xfs_da3_blk_unlink(state, drop_blk, save_blk); in xfs_da3_join()
993 if (error) in xfs_da3_join()
994 return error; in xfs_da3_join()
995 error = xfs_da_shrink_inode(state->args, drop_blk->blkno, in xfs_da3_join()
998 if (error) in xfs_da3_join()
999 return error; in xfs_da3_join()
1008 error = xfs_da3_root_join(state, &state->path.blk[0]); in xfs_da3_join()
1009 return error; in xfs_da3_join()
1049 int error; in xfs_da3_root_join() local
1075 error = xfs_da3_node_read(args->trans, dp, child, -1, &bp, in xfs_da3_root_join()
1077 if (error) in xfs_da3_root_join()
1078 return error; in xfs_da3_root_join()
1097 error = xfs_da_shrink_inode(args, child, bp); in xfs_da3_root_join()
1098 return error; in xfs_da3_root_join()
1123 int error; in xfs_da3_node_toosmall() local
1157 error = xfs_da3_path_shift(state, &state->altpath, forward, in xfs_da3_node_toosmall()
1159 if (error) in xfs_da3_node_toosmall()
1160 return error; in xfs_da3_node_toosmall()
1190 error = xfs_da3_node_read(state->args->trans, dp, in xfs_da3_node_toosmall()
1192 if (error) in xfs_da3_node_toosmall()
1193 return error; in xfs_da3_node_toosmall()
1213 error = xfs_da3_path_shift(state, &state->altpath, forward, in xfs_da3_node_toosmall()
1216 error = xfs_da3_path_shift(state, &state->path, forward, in xfs_da3_node_toosmall()
1219 if (error) in xfs_da3_node_toosmall()
1220 return error; in xfs_da3_node_toosmall()
1462 int error; in xfs_da3_node_lookup_int() local
1480 error = xfs_da3_node_read(args->trans, args->dp, blkno, in xfs_da3_node_lookup_int()
1482 if (error) { in xfs_da3_node_lookup_int()
1485 return error; in xfs_da3_node_lookup_int()
1582 error = xfs_da3_path_shift(state, &state->path, 1, 1, in xfs_da3_node_lookup_int()
1584 if (error) in xfs_da3_node_lookup_int()
1585 return error; in xfs_da3_node_lookup_int()
1650 int error; in xfs_da3_blk_link() local
1687 error = xfs_da3_node_read(args->trans, dp, in xfs_da3_blk_link()
1690 if (error) in xfs_da3_blk_link()
1691 return error; in xfs_da3_blk_link()
1708 error = xfs_da3_node_read(args->trans, dp, in xfs_da3_blk_link()
1711 if (error) in xfs_da3_blk_link()
1712 return error; in xfs_da3_blk_link()
1742 int error; in xfs_da3_blk_unlink() local
1767 error = xfs_da3_node_read(args->trans, args->dp, in xfs_da3_blk_unlink()
1770 if (error) in xfs_da3_blk_unlink()
1771 return error; in xfs_da3_blk_unlink()
1784 error = xfs_da3_node_read(args->trans, args->dp, in xfs_da3_blk_unlink()
1787 if (error) in xfs_da3_blk_unlink()
1788 return error; in xfs_da3_blk_unlink()
1827 int error; in xfs_da3_path_shift() local
1879 error = xfs_da3_node_read(args->trans, dp, blkno, -1, in xfs_da3_path_shift()
1881 if (error) in xfs_da3_path_shift()
1882 return error; in xfs_da3_path_shift()
2005 int nmap, error, got, i, mapi; in xfs_da_grow_inode_int() local
2010 error = xfs_bmap_first_unused(tp, dp, count, bno, w); in xfs_da_grow_inode_int()
2011 if (error) in xfs_da_grow_inode_int()
2012 return error; in xfs_da_grow_inode_int()
2019 error = xfs_bmapi_write(tp, dp, *bno, count, in xfs_da_grow_inode_int()
2023 if (error) in xfs_da_grow_inode_int()
2024 return error; in xfs_da_grow_inode_int()
2042 error = xfs_bmapi_write(tp, dp, b, c, in xfs_da_grow_inode_int()
2046 if (error) in xfs_da_grow_inode_int()
2067 error = -ENOSPC; in xfs_da_grow_inode_int()
2077 return error; in xfs_da_grow_inode_int()
2090 int error; in xfs_da_grow_inode() local
2095 error = xfs_da_grow_inode_int(args, &bno, args->geo->fsbcount); in xfs_da_grow_inode()
2096 if (!error) in xfs_da_grow_inode()
2098 return error; in xfs_da_grow_inode()
2135 int error; in xfs_da3_swap_lastblock() local
2151 error = xfs_bmap_last_before(tp, dp, &lastoff, w); in xfs_da3_swap_lastblock()
2152 if (error) in xfs_da3_swap_lastblock()
2153 return error; in xfs_da3_swap_lastblock()
2163 error = xfs_da3_node_read(tp, dp, last_blkno, -1, &last_buf, w); in xfs_da3_swap_lastblock()
2164 if (error) in xfs_da3_swap_lastblock()
2165 return error; in xfs_da3_swap_lastblock()
2199 error = xfs_da3_node_read(tp, dp, sib_blkno, -1, &sib_buf, w); in xfs_da3_swap_lastblock()
2200 if (error) in xfs_da3_swap_lastblock()
2208 error = -EFSCORRUPTED; in xfs_da3_swap_lastblock()
2221 error = xfs_da3_node_read(tp, dp, sib_blkno, -1, &sib_buf, w); in xfs_da3_swap_lastblock()
2222 if (error) in xfs_da3_swap_lastblock()
2230 error = -EFSCORRUPTED; in xfs_da3_swap_lastblock()
2245 error = xfs_da3_node_read(tp, dp, par_blkno, -1, &par_buf, w); in xfs_da3_swap_lastblock()
2246 if (error) in xfs_da3_swap_lastblock()
2253 error = -EFSCORRUPTED; in xfs_da3_swap_lastblock()
2266 error = -EFSCORRUPTED; in xfs_da3_swap_lastblock()
2293 error = -EFSCORRUPTED; in xfs_da3_swap_lastblock()
2296 error = xfs_da3_node_read(tp, dp, par_blkno, -1, &par_buf, w); in xfs_da3_swap_lastblock()
2297 if (error) in xfs_da3_swap_lastblock()
2304 error = -EFSCORRUPTED; in xfs_da3_swap_lastblock()
2326 return error; in xfs_da3_swap_lastblock()
2339 int done, error, w, count; in xfs_da_shrink_inode() local
2353 error = xfs_bunmapi(tp, dp, dead_blkno, count, in xfs_da_shrink_inode()
2356 if (error == -ENOSPC) { in xfs_da_shrink_inode()
2359 error = xfs_da3_swap_lastblock(args, &dead_blkno, in xfs_da_shrink_inode()
2361 if (error) in xfs_da_shrink_inode()
2368 return error; in xfs_da_shrink_inode()
2458 int error = 0; in xfs_dabuf_map() local
2484 error = xfs_bmapi_read(dp, (xfs_fileoff_t)bno, nfsb, irecs, in xfs_dabuf_map()
2486 if (error) in xfs_dabuf_map()
2497 error = mappedbno == -2 ? -1 : -EFSCORRUPTED; in xfs_dabuf_map()
2498 if (unlikely(error == -EFSCORRUPTED)) { in xfs_dabuf_map()
2519 error = xfs_buf_map_from_irec(mp, map, nmaps, irecs, nirecs); in xfs_dabuf_map()
2523 return error; in xfs_dabuf_map()
2542 int error; in xfs_da_get_buf() local
2547 error = xfs_dabuf_map(dp, bno, mappedbno, whichfork, in xfs_da_get_buf()
2549 if (error) { in xfs_da_get_buf()
2551 if (error == -1) in xfs_da_get_buf()
2552 error = 0; in xfs_da_get_buf()
2558 error = bp ? bp->b_error : -EIO; in xfs_da_get_buf()
2559 if (error) { in xfs_da_get_buf()
2571 return error; in xfs_da_get_buf()
2591 int error; in xfs_da_read_buf() local
2596 error = xfs_dabuf_map(dp, bno, mappedbno, whichfork, in xfs_da_read_buf()
2598 if (error) { in xfs_da_read_buf()
2600 if (error == -1) in xfs_da_read_buf()
2601 error = 0; in xfs_da_read_buf()
2605 error = xfs_trans_read_buf_map(dp->i_mount, trans, in xfs_da_read_buf()
2608 if (error) in xfs_da_read_buf()
2620 return error; in xfs_da_read_buf()
2637 int error; in xfs_da_reada_buf() local
2641 error = xfs_dabuf_map(dp, bno, mappedbno, whichfork, in xfs_da_reada_buf()
2643 if (error) { in xfs_da_reada_buf()
2645 if (error == -1) in xfs_da_reada_buf()
2646 error = 0; in xfs_da_reada_buf()
2657 if (error) in xfs_da_reada_buf()