Lines Matching refs:error

216 	int				error;
218 error = xfs_btree_get_rec(cur, &rec, stat);
219 if (error || !*stat)
220 return error;
234 * This either works (return 0) or gets an EFSCORRUPTED error.
243 int error;
253 error = xfs_btree_update(cur, &rec);
254 if (error)
255 trace_xfs_refcount_update_error(cur, error, _RET_IP_);
256 return error;
262 * This either works (return 0) or gets an EFSCORRUPTED error.
270 int error;
279 error = xfs_btree_insert(cur, i);
280 if (error)
284 error = -EFSCORRUPTED;
289 if (error)
290 trace_xfs_refcount_insert_error(cur, error, _RET_IP_);
291 return error;
298 * This either works (return 0) or gets an EFSCORRUPTED error.
307 int error;
309 error = xfs_refcount_get_rec(cur, &irec, &found_rec);
310 if (error)
314 error = -EFSCORRUPTED;
318 error = xfs_btree_delete(cur, i);
321 error = -EFSCORRUPTED;
324 if (error)
326 error = xfs_refcount_lookup_ge(cur, irec.rc_domain, irec.rc_startblock,
329 if (error)
330 trace_xfs_refcount_delete_error(cur, error, _RET_IP_);
331 return error;
431 int error;
434 error = xfs_refcount_lookup_le(cur, domain, agbno, &found_rec);
435 if (error)
440 error = xfs_refcount_get_rec(cur, &rcext, &found_rec);
441 if (error)
445 error = -EFSCORRUPTED;
460 error = xfs_refcount_update(cur, &tmp);
461 if (error)
467 error = xfs_refcount_insert(cur, &tmp, &found_rec);
468 if (error)
472 error = -EFSCORRUPTED;
475 return error;
478 trace_xfs_refcount_split_extent_error(cur, error, _RET_IP_);
479 return error;
494 int error;
510 error = xfs_refcount_lookup_ge(cur, center->rc_domain,
512 if (error)
516 error = -EFSCORRUPTED;
520 error = xfs_refcount_delete(cur, &found_rec);
521 if (error)
525 error = -EFSCORRUPTED;
530 error = xfs_refcount_delete(cur, &found_rec);
531 if (error)
535 error = -EFSCORRUPTED;
541 error = xfs_refcount_lookup_le(cur, left->rc_domain,
543 if (error)
547 error = -EFSCORRUPTED;
552 error = xfs_refcount_update(cur, left);
553 if (error)
557 return error;
560 trace_xfs_refcount_merge_center_extents_error(cur, error, _RET_IP_);
561 return error;
575 int error;
584 error = xfs_refcount_lookup_le(cur, cleft->rc_domain,
586 if (error)
590 error = -EFSCORRUPTED;
594 error = xfs_refcount_delete(cur, &found_rec);
595 if (error)
599 error = -EFSCORRUPTED;
605 error = xfs_refcount_lookup_le(cur, left->rc_domain,
607 if (error)
611 error = -EFSCORRUPTED;
616 error = xfs_refcount_update(cur, left);
617 if (error)
622 return error;
625 trace_xfs_refcount_merge_left_extent_error(cur, error, _RET_IP_);
626 return error;
639 int error;
651 error = xfs_refcount_lookup_le(cur, cright->rc_domain,
653 if (error)
657 error = -EFSCORRUPTED;
661 error = xfs_refcount_delete(cur, &found_rec);
662 if (error)
666 error = -EFSCORRUPTED;
672 error = xfs_refcount_lookup_le(cur, right->rc_domain,
674 if (error)
678 error = -EFSCORRUPTED;
684 error = xfs_refcount_update(cur, right);
685 if (error)
689 return error;
692 trace_xfs_refcount_merge_right_extent_error(cur, error, _RET_IP_);
693 return error;
710 int error;
714 error = xfs_refcount_lookup_le(cur, domain, agbno - 1, &found_rec);
715 if (error)
720 error = xfs_refcount_get_rec(cur, &tmp, &found_rec);
721 if (error)
725 error = -EFSCORRUPTED;
736 error = xfs_btree_increment(cur, 0, &found_rec);
737 if (error)
740 error = xfs_refcount_get_rec(cur, &tmp, &found_rec);
741 if (error)
745 error = -EFSCORRUPTED;
782 return error;
785 trace_xfs_refcount_find_left_extent_error(cur, error, _RET_IP_);
786 return error;
803 int error;
807 error = xfs_refcount_lookup_ge(cur, domain, agbno + aglen, &found_rec);
808 if (error)
813 error = xfs_refcount_get_rec(cur, &tmp, &found_rec);
814 if (error)
818 error = -EFSCORRUPTED;
829 error = xfs_btree_decrement(cur, 0, &found_rec);
830 if (error)
833 error = xfs_refcount_get_rec(cur, &tmp, &found_rec);
834 if (error)
838 error = -EFSCORRUPTED;
876 return error;
879 trace_xfs_refcount_find_right_extent_error(cur, error, _RET_IP_);
880 return error;
1030 int error;
1040 error = xfs_refcount_find_left_extents(cur, &left, &cleft, domain,
1042 if (error)
1043 return error;
1044 error = xfs_refcount_find_right_extents(cur, &right, &cright, domain,
1046 if (error)
1047 return error;
1067 error = xfs_refcount_merge_left_extent(cur, &left, &cleft,
1069 if (error)
1070 return error;
1113 * refcount continue update "error" has been injected.
1158 int error;
1165 error = xfs_refcount_lookup_ge(cur, XFS_REFC_DOMAIN_SHARED, *agbno,
1167 if (error)
1171 error = xfs_refcount_get_rec(cur, &ext, &found_rec);
1172 if (error)
1201 error = xfs_refcount_insert(cur, &tmp,
1203 if (error)
1208 error = -EFSCORRUPTED;
1212 error = xrefc_free_extent(cur, &tmp);
1213 if (error)
1225 error = xfs_refcount_lookup_ge(cur,
1228 if (error)
1242 error = -EFSCORRUPTED;
1256 error = xfs_refcount_update(cur, &ext);
1257 if (error)
1260 error = xfs_refcount_delete(cur, &found_rec);
1261 if (error)
1265 error = -EFSCORRUPTED;
1270 error = xrefc_free_extent(cur, &ext);
1271 if (error)
1276 error = xfs_btree_increment(cur, 0, &found_rec);
1277 if (error)
1285 return error;
1287 trace_xfs_refcount_modify_extent_error(cur, error, _RET_IP_);
1288 return error;
1301 int error;
1311 error = xfs_refcount_split_extent(cur, XFS_REFC_DOMAIN_SHARED,
1313 if (error)
1318 error = xfs_refcount_split_extent(cur, XFS_REFC_DOMAIN_SHARED,
1320 if (error)
1328 error = xfs_refcount_merge_extents(cur, XFS_REFC_DOMAIN_SHARED,
1330 if (error)
1338 error = xfs_refcount_adjust_extents(cur, agbno, aglen, adj);
1339 if (error)
1345 trace_xfs_refcount_adjust_error(cur, error, _RET_IP_);
1346 return error;
1392 int error = 0;
1418 error = xfs_alloc_read_agf(pag, tp,
1420 if (error)
1421 return error;
1430 error = xfs_refcount_adjust(rcur, &bno, &ri->ri_blockcount,
1432 if (error)
1433 return error;
1435 error = xfs_refcount_continue_op(rcur, ri, bno);
1438 error = xfs_refcount_adjust(rcur, &bno, &ri->ri_blockcount,
1440 if (error)
1441 return error;
1443 error = xfs_refcount_continue_op(rcur, ri, bno);
1446 error = __xfs_refcount_cow_alloc(rcur, bno, ri->ri_blockcount);
1447 if (error)
1448 return error;
1452 error = __xfs_refcount_cow_free(rcur, bno, ri->ri_blockcount);
1453 if (error)
1454 return error;
1461 if (!error && ri->ri_blockcount > 0)
1463 return error;
1505 int error = 0;
1539 error = xfs_refcount_adjust(rcur, &bno, &ri->ri_blockcount,
1541 if (error)
1542 return error;
1544 error = xfs_rtrefcount_continue_op(rcur, ri, bno);
1547 error = xfs_refcount_adjust(rcur, &bno, &ri->ri_blockcount,
1549 if (error)
1550 return error;
1552 error = xfs_rtrefcount_continue_op(rcur, ri, bno);
1555 error = __xfs_refcount_cow_alloc(rcur, bno, ri->ri_blockcount);
1556 if (error)
1557 return error;
1561 error = __xfs_refcount_cow_free(rcur, bno, ri->ri_blockcount);
1562 if (error)
1563 return error;
1570 if (!error && ri->ri_blockcount > 0)
1572 return error;
1651 int error;
1660 error = xfs_refcount_lookup_le(cur, XFS_REFC_DOMAIN_SHARED, agbno,
1662 if (error)
1666 error = xfs_btree_increment(cur, 0, &have);
1667 if (error)
1672 error = xfs_refcount_get_rec(cur, &tmp, &i);
1673 if (error)
1677 error = -EFSCORRUPTED;
1685 error = xfs_btree_increment(cur, 0, &have);
1686 if (error)
1690 error = xfs_refcount_get_rec(cur, &tmp, &i);
1691 if (error)
1695 error = -EFSCORRUPTED;
1719 error = xfs_btree_increment(cur, 0, &have);
1720 if (error)
1724 error = xfs_refcount_get_rec(cur, &tmp, &i);
1725 if (error)
1729 error = -EFSCORRUPTED;
1743 if (error)
1744 trace_xfs_refcount_find_shared_error(cur, error, _RET_IP_);
1745 return error;
1808 int error;
1815 error = xfs_refcount_lookup_ge(cur, XFS_REFC_DOMAIN_COW, agbno,
1817 if (error)
1819 error = xfs_refcount_get_rec(cur, &ext, &found_rec);
1820 if (error)
1825 error = -EFSCORRUPTED;
1841 error = -EFSCORRUPTED;
1852 error = xfs_refcount_insert(cur, &tmp,
1854 if (error)
1858 error = -EFSCORRUPTED;
1866 error = -EFSCORRUPTED;
1871 error = -EFSCORRUPTED;
1876 error = -EFSCORRUPTED;
1882 error = xfs_refcount_delete(cur, &found_rec);
1883 if (error)
1887 error = -EFSCORRUPTED;
1895 return error;
1897 trace_xfs_refcount_modify_extent_error(cur, error, _RET_IP_);
1898 return error;
1912 int error;
1917 error = xfs_refcount_split_extent(cur, XFS_REFC_DOMAIN_COW,
1919 if (error)
1922 error = xfs_refcount_split_extent(cur, XFS_REFC_DOMAIN_COW,
1924 if (error)
1930 error = xfs_refcount_merge_extents(cur, XFS_REFC_DOMAIN_COW, &agbno,
1932 if (error)
1936 error = xfs_refcount_adjust_cow_extents(cur, agbno, aglen, adj);
1937 if (error)
1943 trace_xfs_refcount_adjust_cow_error(cur, error, _RET_IP_);
1944 return error;
2074 int error;
2108 error = xfs_alloc_read_agf(to_perag(xg), tp, 0, &agbp);
2109 if (error)
2115 error = xfs_btree_query_range(cur, &low, &high,
2117 xfs_btree_del_cursor(cur, error);
2123 if (error)
2129 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, 0, 0, 0, &tp);
2130 if (error)
2139 error = xfs_free_extent_later(tp, fsb,
2143 if (error)
2146 error = xfs_trans_commit(tp);
2147 if (error)
2154 return error;
2163 return error;