Lines Matching defs:error
113 int error;
116 error = xfs_btree_get_rec(cur, &rec, stat);
117 if (error || !*stat)
118 return error;
162 * This either works (return 0) or gets an EFSCORRUPTED error.
170 int error;
176 error = xfs_btree_update(cur, &rec);
177 if (error)
179 cur->bc_ag.agno, error, _RET_IP_);
180 return error;
186 * This either works (return 0) or gets an EFSCORRUPTED error.
194 int error;
200 error = xfs_btree_insert(cur, i);
201 if (error)
204 error = -EFSCORRUPTED;
209 if (error)
211 cur->bc_ag.agno, error, _RET_IP_);
212 return error;
219 * This either works (return 0) or gets an EFSCORRUPTED error.
228 int error;
230 error = xfs_refcount_get_rec(cur, &irec, &found_rec);
231 if (error)
234 error = -EFSCORRUPTED;
238 error = xfs_btree_delete(cur, i);
240 error = -EFSCORRUPTED;
243 if (error)
245 error = xfs_refcount_lookup_ge(cur, irec.rc_startblock, &found_rec);
247 if (error)
249 cur->bc_ag.agno, error, _RET_IP_);
250 return error;
349 int error;
352 error = xfs_refcount_lookup_le(cur, agbno, &found_rec);
353 if (error)
358 error = xfs_refcount_get_rec(cur, &rcext, &found_rec);
359 if (error)
362 error = -EFSCORRUPTED;
376 error = xfs_refcount_update(cur, &tmp);
377 if (error)
383 error = xfs_refcount_insert(cur, &tmp, &found_rec);
384 if (error)
387 error = -EFSCORRUPTED;
390 return error;
394 cur->bc_ag.agno, error, _RET_IP_);
395 return error;
410 int error;
424 error = xfs_refcount_lookup_ge(cur, center->rc_startblock,
426 if (error)
429 error = -EFSCORRUPTED;
433 error = xfs_refcount_delete(cur, &found_rec);
434 if (error)
437 error = -EFSCORRUPTED;
442 error = xfs_refcount_delete(cur, &found_rec);
443 if (error)
446 error = -EFSCORRUPTED;
452 error = xfs_refcount_lookup_le(cur, left->rc_startblock,
454 if (error)
457 error = -EFSCORRUPTED;
462 error = xfs_refcount_update(cur, left);
463 if (error)
467 return error;
471 cur->bc_ag.agno, error, _RET_IP_);
472 return error;
486 int error;
494 error = xfs_refcount_lookup_le(cur, cleft->rc_startblock,
496 if (error)
499 error = -EFSCORRUPTED;
503 error = xfs_refcount_delete(cur, &found_rec);
504 if (error)
507 error = -EFSCORRUPTED;
513 error = xfs_refcount_lookup_le(cur, left->rc_startblock,
515 if (error)
518 error = -EFSCORRUPTED;
523 error = xfs_refcount_update(cur, left);
524 if (error)
529 return error;
533 cur->bc_ag.agno, error, _RET_IP_);
534 return error;
547 int error;
558 error = xfs_refcount_lookup_le(cur, cright->rc_startblock,
560 if (error)
563 error = -EFSCORRUPTED;
567 error = xfs_refcount_delete(cur, &found_rec);
568 if (error)
571 error = -EFSCORRUPTED;
577 error = xfs_refcount_lookup_le(cur, right->rc_startblock,
579 if (error)
582 error = -EFSCORRUPTED;
588 error = xfs_refcount_update(cur, right);
589 if (error)
593 return error;
597 cur->bc_ag.agno, error, _RET_IP_);
598 return error;
617 int error;
621 error = xfs_refcount_lookup_le(cur, agbno - 1, &found_rec);
622 if (error)
627 error = xfs_refcount_get_rec(cur, &tmp, &found_rec);
628 if (error)
631 error = -EFSCORRUPTED;
644 error = xfs_btree_increment(cur, 0, &found_rec);
645 if (error)
648 error = xfs_refcount_get_rec(cur, &tmp, &found_rec);
649 if (error)
652 error = -EFSCORRUPTED;
684 return error;
688 cur->bc_ag.agno, error, _RET_IP_);
689 return error;
706 int error;
710 error = xfs_refcount_lookup_ge(cur, agbno + aglen, &found_rec);
711 if (error)
716 error = xfs_refcount_get_rec(cur, &tmp, &found_rec);
717 if (error)
720 error = -EFSCORRUPTED;
733 error = xfs_btree_decrement(cur, 0, &found_rec);
734 if (error)
737 error = xfs_refcount_get_rec(cur, &tmp, &found_rec);
738 if (error)
741 error = -EFSCORRUPTED;
773 return error;
777 cur->bc_ag.agno, error, _RET_IP_);
778 return error;
803 int error;
813 error = xfs_refcount_find_left_extents(cur, &left, &cleft, *agbno,
815 if (error)
816 return error;
817 error = xfs_refcount_find_right_extents(cur, &right, &cright, *agbno,
819 if (error)
820 return error;
848 error = xfs_refcount_merge_left_extent(cur, &left, &cleft,
850 if (error)
851 return error;
871 return error;
892 * refcount continue update "error" has been injected.
922 int error;
930 error = xfs_refcount_lookup_ge(cur, *agbno, &found_rec);
931 if (error)
935 error = xfs_refcount_get_rec(cur, &ext, &found_rec);
936 if (error)
962 error = xfs_refcount_insert(cur, &tmp,
964 if (error)
968 error = -EFSCORRUPTED;
983 error = xfs_refcount_lookup_ge(cur, *agbno,
985 if (error)
1003 error = xfs_refcount_update(cur, &ext);
1004 if (error)
1008 error = xfs_refcount_delete(cur, &found_rec);
1009 if (error)
1012 error = -EFSCORRUPTED;
1026 error = xfs_btree_increment(cur, 0, &found_rec);
1027 if (error)
1035 return error;
1038 cur->bc_ag.agno, error, _RET_IP_);
1039 return error;
1055 int error;
1069 error = xfs_refcount_split_extent(cur, agbno, &shape_changed);
1070 if (error)
1075 error = xfs_refcount_split_extent(cur, agbno + aglen, &shape_changed);
1076 if (error)
1084 error = xfs_refcount_merge_extents(cur, new_agbno, new_aglen, adj,
1086 if (error)
1094 error = xfs_refcount_adjust_extents(cur, new_agbno, new_aglen,
1096 if (error)
1103 error, _RET_IP_);
1104 return error;
1112 int error)
1119 xfs_btree_del_cursor(rcur, error);
1120 if (error)
1144 int error = 0;
1176 error = xfs_alloc_read_agf(tp->t_mountp, tp, agno,
1178 if (error)
1179 return error;
1183 error = -ENOMEM;
1193 error = xfs_refcount_adjust(rcur, bno, blockcount, &new_agbno,
1198 error = xfs_refcount_adjust(rcur, bno, blockcount, &new_agbno,
1205 error = __xfs_refcount_cow_alloc(rcur, bno, blockcount);
1210 error = __xfs_refcount_cow_free(rcur, bno, blockcount);
1214 error = -EFSCORRUPTED;
1216 if (!error && *new_len > 0)
1219 return error;
1224 return error;
1304 int error;
1314 error = xfs_refcount_lookup_le(cur, agbno, &have);
1315 if (error)
1319 error = xfs_btree_increment(cur, 0, &have);
1320 if (error)
1325 error = xfs_refcount_get_rec(cur, &tmp, &i);
1326 if (error)
1329 error = -EFSCORRUPTED;
1335 error = xfs_btree_increment(cur, 0, &have);
1336 if (error)
1340 error = xfs_refcount_get_rec(cur, &tmp, &i);
1341 if (error)
1344 error = -EFSCORRUPTED;
1366 error = xfs_btree_increment(cur, 0, &have);
1367 if (error)
1371 error = xfs_refcount_get_rec(cur, &tmp, &i);
1372 if (error)
1375 error = -EFSCORRUPTED;
1389 if (error)
1391 cur->bc_ag.agno, error, _RET_IP_);
1392 return error;
1455 int error;
1462 error = xfs_refcount_lookup_ge(cur, agbno, &found_rec);
1463 if (error)
1465 error = xfs_refcount_get_rec(cur, &ext, &found_rec);
1466 if (error)
1480 error = -EFSCORRUPTED;
1490 error = xfs_refcount_insert(cur, &tmp,
1492 if (error)
1495 error = -EFSCORRUPTED;
1502 error = -EFSCORRUPTED;
1506 error = -EFSCORRUPTED;
1510 error = -EFSCORRUPTED;
1517 error = xfs_refcount_delete(cur, &found_rec);
1518 if (error)
1521 error = -EFSCORRUPTED;
1529 return error;
1532 cur->bc_ag.agno, error, _RET_IP_);
1533 return error;
1547 int error;
1554 error = xfs_refcount_split_extent(cur, agbno, &shape_changed);
1555 if (error)
1558 error = xfs_refcount_split_extent(cur, agbno + aglen, &shape_changed);
1559 if (error)
1565 error = xfs_refcount_merge_extents(cur, &agbno, &aglen, adj,
1567 if (error)
1571 error = xfs_refcount_adjust_cow_extents(cur, agbno, aglen, adj);
1572 if (error)
1579 error, _RET_IP_);
1580 return error;
1695 int error;
1712 error = xfs_trans_alloc_empty(mp, &tp);
1713 if (error)
1714 return error;
1716 error = xfs_alloc_read_agf(mp, tp, agno, 0, &agbp);
1717 if (error)
1726 error = xfs_btree_query_range(cur, &low, &high,
1728 xfs_btree_del_cursor(cur, error);
1731 if (error)
1737 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, 0, 0, 0, &tp);
1738 if (error)
1752 error = xfs_trans_commit(tp);
1753 if (error)
1760 return error;
1769 return error;