Lines Matching refs:error

116 	int				error;  in xfs_refcount_get_rec()  local
119 error = xfs_btree_get_rec(cur, &rec, stat); in xfs_refcount_get_rec()
120 if (error || !*stat) in xfs_refcount_get_rec()
121 return error; in xfs_refcount_get_rec()
173 int error; in xfs_refcount_update() local
179 error = xfs_btree_update(cur, &rec); in xfs_refcount_update()
180 if (error) in xfs_refcount_update()
182 cur->bc_ag.pag->pag_agno, error, _RET_IP_); in xfs_refcount_update()
183 return error; in xfs_refcount_update()
197 int error; in xfs_refcount_insert() local
203 error = xfs_btree_insert(cur, i); in xfs_refcount_insert()
204 if (error) in xfs_refcount_insert()
207 error = -EFSCORRUPTED; in xfs_refcount_insert()
212 if (error) in xfs_refcount_insert()
214 cur->bc_ag.pag->pag_agno, error, _RET_IP_); in xfs_refcount_insert()
215 return error; in xfs_refcount_insert()
231 int error; in xfs_refcount_delete() local
233 error = xfs_refcount_get_rec(cur, &irec, &found_rec); in xfs_refcount_delete()
234 if (error) in xfs_refcount_delete()
237 error = -EFSCORRUPTED; in xfs_refcount_delete()
241 error = xfs_btree_delete(cur, i); in xfs_refcount_delete()
243 error = -EFSCORRUPTED; in xfs_refcount_delete()
246 if (error) in xfs_refcount_delete()
248 error = xfs_refcount_lookup_ge(cur, irec.rc_startblock, &found_rec); in xfs_refcount_delete()
250 if (error) in xfs_refcount_delete()
252 cur->bc_ag.pag->pag_agno, error, _RET_IP_); in xfs_refcount_delete()
253 return error; in xfs_refcount_delete()
352 int error; in xfs_refcount_split_extent() local
355 error = xfs_refcount_lookup_le(cur, agbno, &found_rec); in xfs_refcount_split_extent()
356 if (error) in xfs_refcount_split_extent()
361 error = xfs_refcount_get_rec(cur, &rcext, &found_rec); in xfs_refcount_split_extent()
362 if (error) in xfs_refcount_split_extent()
365 error = -EFSCORRUPTED; in xfs_refcount_split_extent()
379 error = xfs_refcount_update(cur, &tmp); in xfs_refcount_split_extent()
380 if (error) in xfs_refcount_split_extent()
386 error = xfs_refcount_insert(cur, &tmp, &found_rec); in xfs_refcount_split_extent()
387 if (error) in xfs_refcount_split_extent()
390 error = -EFSCORRUPTED; in xfs_refcount_split_extent()
393 return error; in xfs_refcount_split_extent()
397 cur->bc_ag.pag->pag_agno, error, _RET_IP_); in xfs_refcount_split_extent()
398 return error; in xfs_refcount_split_extent()
413 int error; in xfs_refcount_merge_center_extents() local
427 error = xfs_refcount_lookup_ge(cur, center->rc_startblock, in xfs_refcount_merge_center_extents()
429 if (error) in xfs_refcount_merge_center_extents()
432 error = -EFSCORRUPTED; in xfs_refcount_merge_center_extents()
436 error = xfs_refcount_delete(cur, &found_rec); in xfs_refcount_merge_center_extents()
437 if (error) in xfs_refcount_merge_center_extents()
440 error = -EFSCORRUPTED; in xfs_refcount_merge_center_extents()
445 error = xfs_refcount_delete(cur, &found_rec); in xfs_refcount_merge_center_extents()
446 if (error) in xfs_refcount_merge_center_extents()
449 error = -EFSCORRUPTED; in xfs_refcount_merge_center_extents()
455 error = xfs_refcount_lookup_le(cur, left->rc_startblock, in xfs_refcount_merge_center_extents()
457 if (error) in xfs_refcount_merge_center_extents()
460 error = -EFSCORRUPTED; in xfs_refcount_merge_center_extents()
465 error = xfs_refcount_update(cur, left); in xfs_refcount_merge_center_extents()
466 if (error) in xfs_refcount_merge_center_extents()
470 return error; in xfs_refcount_merge_center_extents()
474 cur->bc_ag.pag->pag_agno, error, _RET_IP_); in xfs_refcount_merge_center_extents()
475 return error; in xfs_refcount_merge_center_extents()
489 int error; in xfs_refcount_merge_left_extent() local
497 error = xfs_refcount_lookup_le(cur, cleft->rc_startblock, in xfs_refcount_merge_left_extent()
499 if (error) in xfs_refcount_merge_left_extent()
502 error = -EFSCORRUPTED; in xfs_refcount_merge_left_extent()
506 error = xfs_refcount_delete(cur, &found_rec); in xfs_refcount_merge_left_extent()
507 if (error) in xfs_refcount_merge_left_extent()
510 error = -EFSCORRUPTED; in xfs_refcount_merge_left_extent()
516 error = xfs_refcount_lookup_le(cur, left->rc_startblock, in xfs_refcount_merge_left_extent()
518 if (error) in xfs_refcount_merge_left_extent()
521 error = -EFSCORRUPTED; in xfs_refcount_merge_left_extent()
526 error = xfs_refcount_update(cur, left); in xfs_refcount_merge_left_extent()
527 if (error) in xfs_refcount_merge_left_extent()
532 return error; in xfs_refcount_merge_left_extent()
536 cur->bc_ag.pag->pag_agno, error, _RET_IP_); in xfs_refcount_merge_left_extent()
537 return error; in xfs_refcount_merge_left_extent()
550 int error; in xfs_refcount_merge_right_extent() local
561 error = xfs_refcount_lookup_le(cur, cright->rc_startblock, in xfs_refcount_merge_right_extent()
563 if (error) in xfs_refcount_merge_right_extent()
566 error = -EFSCORRUPTED; in xfs_refcount_merge_right_extent()
570 error = xfs_refcount_delete(cur, &found_rec); in xfs_refcount_merge_right_extent()
571 if (error) in xfs_refcount_merge_right_extent()
574 error = -EFSCORRUPTED; in xfs_refcount_merge_right_extent()
580 error = xfs_refcount_lookup_le(cur, right->rc_startblock, in xfs_refcount_merge_right_extent()
582 if (error) in xfs_refcount_merge_right_extent()
585 error = -EFSCORRUPTED; in xfs_refcount_merge_right_extent()
591 error = xfs_refcount_update(cur, right); in xfs_refcount_merge_right_extent()
592 if (error) in xfs_refcount_merge_right_extent()
596 return error; in xfs_refcount_merge_right_extent()
600 cur->bc_ag.pag->pag_agno, error, _RET_IP_); in xfs_refcount_merge_right_extent()
601 return error; in xfs_refcount_merge_right_extent()
620 int error; in xfs_refcount_find_left_extents() local
624 error = xfs_refcount_lookup_le(cur, agbno - 1, &found_rec); in xfs_refcount_find_left_extents()
625 if (error) in xfs_refcount_find_left_extents()
630 error = xfs_refcount_get_rec(cur, &tmp, &found_rec); in xfs_refcount_find_left_extents()
631 if (error) in xfs_refcount_find_left_extents()
634 error = -EFSCORRUPTED; in xfs_refcount_find_left_extents()
647 error = xfs_btree_increment(cur, 0, &found_rec); in xfs_refcount_find_left_extents()
648 if (error) in xfs_refcount_find_left_extents()
651 error = xfs_refcount_get_rec(cur, &tmp, &found_rec); in xfs_refcount_find_left_extents()
652 if (error) in xfs_refcount_find_left_extents()
655 error = -EFSCORRUPTED; in xfs_refcount_find_left_extents()
687 return error; in xfs_refcount_find_left_extents()
691 cur->bc_ag.pag->pag_agno, error, _RET_IP_); in xfs_refcount_find_left_extents()
692 return error; in xfs_refcount_find_left_extents()
709 int error; in xfs_refcount_find_right_extents() local
713 error = xfs_refcount_lookup_ge(cur, agbno + aglen, &found_rec); in xfs_refcount_find_right_extents()
714 if (error) in xfs_refcount_find_right_extents()
719 error = xfs_refcount_get_rec(cur, &tmp, &found_rec); in xfs_refcount_find_right_extents()
720 if (error) in xfs_refcount_find_right_extents()
723 error = -EFSCORRUPTED; in xfs_refcount_find_right_extents()
736 error = xfs_btree_decrement(cur, 0, &found_rec); in xfs_refcount_find_right_extents()
737 if (error) in xfs_refcount_find_right_extents()
740 error = xfs_refcount_get_rec(cur, &tmp, &found_rec); in xfs_refcount_find_right_extents()
741 if (error) in xfs_refcount_find_right_extents()
744 error = -EFSCORRUPTED; in xfs_refcount_find_right_extents()
776 return error; in xfs_refcount_find_right_extents()
780 cur->bc_ag.pag->pag_agno, error, _RET_IP_); in xfs_refcount_find_right_extents()
781 return error; in xfs_refcount_find_right_extents()
806 int error; in xfs_refcount_merge_extents() local
816 error = xfs_refcount_find_left_extents(cur, &left, &cleft, *agbno, in xfs_refcount_merge_extents()
818 if (error) in xfs_refcount_merge_extents()
819 return error; in xfs_refcount_merge_extents()
820 error = xfs_refcount_find_right_extents(cur, &right, &cright, *agbno, in xfs_refcount_merge_extents()
822 if (error) in xfs_refcount_merge_extents()
823 return error; in xfs_refcount_merge_extents()
851 error = xfs_refcount_merge_left_extent(cur, &left, &cleft, in xfs_refcount_merge_extents()
853 if (error) in xfs_refcount_merge_extents()
854 return error; in xfs_refcount_merge_extents()
874 return error; in xfs_refcount_merge_extents()
924 int error; in xfs_refcount_adjust_extents() local
932 error = xfs_refcount_lookup_ge(cur, *agbno, &found_rec); in xfs_refcount_adjust_extents()
933 if (error) in xfs_refcount_adjust_extents()
937 error = xfs_refcount_get_rec(cur, &ext, &found_rec); in xfs_refcount_adjust_extents()
938 if (error) in xfs_refcount_adjust_extents()
964 error = xfs_refcount_insert(cur, &tmp, in xfs_refcount_adjust_extents()
966 if (error) in xfs_refcount_adjust_extents()
970 error = -EFSCORRUPTED; in xfs_refcount_adjust_extents()
985 error = xfs_refcount_lookup_ge(cur, *agbno, in xfs_refcount_adjust_extents()
987 if (error) in xfs_refcount_adjust_extents()
1005 error = xfs_refcount_update(cur, &ext); in xfs_refcount_adjust_extents()
1006 if (error) in xfs_refcount_adjust_extents()
1010 error = xfs_refcount_delete(cur, &found_rec); in xfs_refcount_adjust_extents()
1011 if (error) in xfs_refcount_adjust_extents()
1014 error = -EFSCORRUPTED; in xfs_refcount_adjust_extents()
1028 error = xfs_btree_increment(cur, 0, &found_rec); in xfs_refcount_adjust_extents()
1029 if (error) in xfs_refcount_adjust_extents()
1037 return error; in xfs_refcount_adjust_extents()
1040 cur->bc_ag.pag->pag_agno, error, _RET_IP_); in xfs_refcount_adjust_extents()
1041 return error; in xfs_refcount_adjust_extents()
1056 int error; in xfs_refcount_adjust() local
1070 error = xfs_refcount_split_extent(cur, agbno, &shape_changed); in xfs_refcount_adjust()
1071 if (error) in xfs_refcount_adjust()
1076 error = xfs_refcount_split_extent(cur, agbno + aglen, &shape_changed); in xfs_refcount_adjust()
1077 if (error) in xfs_refcount_adjust()
1085 error = xfs_refcount_merge_extents(cur, new_agbno, new_aglen, adj, in xfs_refcount_adjust()
1087 if (error) in xfs_refcount_adjust()
1095 error = xfs_refcount_adjust_extents(cur, new_agbno, new_aglen, adj); in xfs_refcount_adjust()
1096 if (error) in xfs_refcount_adjust()
1103 error, _RET_IP_); in xfs_refcount_adjust()
1104 return error; in xfs_refcount_adjust()
1112 int error) in xfs_refcount_finish_one_cleanup() argument
1119 xfs_btree_del_cursor(rcur, error); in xfs_refcount_finish_one_cleanup()
1120 if (error) in xfs_refcount_finish_one_cleanup()
1144 int error = 0; in xfs_refcount_finish_one() local
1159 error = -EIO; in xfs_refcount_finish_one()
1176 error = xfs_alloc_read_agf(tp->t_mountp, tp, pag->pag_agno, in xfs_refcount_finish_one()
1178 if (error) in xfs_refcount_finish_one()
1189 error = xfs_refcount_adjust(rcur, bno, blockcount, &new_agbno, in xfs_refcount_finish_one()
1194 error = xfs_refcount_adjust(rcur, bno, blockcount, &new_agbno, in xfs_refcount_finish_one()
1201 error = __xfs_refcount_cow_alloc(rcur, bno, blockcount); in xfs_refcount_finish_one()
1206 error = __xfs_refcount_cow_free(rcur, bno, blockcount); in xfs_refcount_finish_one()
1210 error = -EFSCORRUPTED; in xfs_refcount_finish_one()
1212 if (!error && *new_len > 0) in xfs_refcount_finish_one()
1217 return error; in xfs_refcount_finish_one()
1297 int error; in xfs_refcount_find_shared() local
1307 error = xfs_refcount_lookup_le(cur, agbno, &have); in xfs_refcount_find_shared()
1308 if (error) in xfs_refcount_find_shared()
1312 error = xfs_btree_increment(cur, 0, &have); in xfs_refcount_find_shared()
1313 if (error) in xfs_refcount_find_shared()
1318 error = xfs_refcount_get_rec(cur, &tmp, &i); in xfs_refcount_find_shared()
1319 if (error) in xfs_refcount_find_shared()
1322 error = -EFSCORRUPTED; in xfs_refcount_find_shared()
1328 error = xfs_btree_increment(cur, 0, &have); in xfs_refcount_find_shared()
1329 if (error) in xfs_refcount_find_shared()
1333 error = xfs_refcount_get_rec(cur, &tmp, &i); in xfs_refcount_find_shared()
1334 if (error) in xfs_refcount_find_shared()
1337 error = -EFSCORRUPTED; in xfs_refcount_find_shared()
1359 error = xfs_btree_increment(cur, 0, &have); in xfs_refcount_find_shared()
1360 if (error) in xfs_refcount_find_shared()
1364 error = xfs_refcount_get_rec(cur, &tmp, &i); in xfs_refcount_find_shared()
1365 if (error) in xfs_refcount_find_shared()
1368 error = -EFSCORRUPTED; in xfs_refcount_find_shared()
1382 if (error) in xfs_refcount_find_shared()
1384 cur->bc_ag.pag->pag_agno, error, _RET_IP_); in xfs_refcount_find_shared()
1385 return error; in xfs_refcount_find_shared()
1448 int error; in xfs_refcount_adjust_cow_extents() local
1455 error = xfs_refcount_lookup_ge(cur, agbno, &found_rec); in xfs_refcount_adjust_cow_extents()
1456 if (error) in xfs_refcount_adjust_cow_extents()
1458 error = xfs_refcount_get_rec(cur, &ext, &found_rec); in xfs_refcount_adjust_cow_extents()
1459 if (error) in xfs_refcount_adjust_cow_extents()
1473 error = -EFSCORRUPTED; in xfs_refcount_adjust_cow_extents()
1483 error = xfs_refcount_insert(cur, &tmp, in xfs_refcount_adjust_cow_extents()
1485 if (error) in xfs_refcount_adjust_cow_extents()
1488 error = -EFSCORRUPTED; in xfs_refcount_adjust_cow_extents()
1495 error = -EFSCORRUPTED; in xfs_refcount_adjust_cow_extents()
1499 error = -EFSCORRUPTED; in xfs_refcount_adjust_cow_extents()
1503 error = -EFSCORRUPTED; in xfs_refcount_adjust_cow_extents()
1510 error = xfs_refcount_delete(cur, &found_rec); in xfs_refcount_adjust_cow_extents()
1511 if (error) in xfs_refcount_adjust_cow_extents()
1514 error = -EFSCORRUPTED; in xfs_refcount_adjust_cow_extents()
1522 return error; in xfs_refcount_adjust_cow_extents()
1525 cur->bc_ag.pag->pag_agno, error, _RET_IP_); in xfs_refcount_adjust_cow_extents()
1526 return error; in xfs_refcount_adjust_cow_extents()
1540 int error; in xfs_refcount_adjust_cow() local
1547 error = xfs_refcount_split_extent(cur, agbno, &shape_changed); in xfs_refcount_adjust_cow()
1548 if (error) in xfs_refcount_adjust_cow()
1551 error = xfs_refcount_split_extent(cur, agbno + aglen, &shape_changed); in xfs_refcount_adjust_cow()
1552 if (error) in xfs_refcount_adjust_cow()
1558 error = xfs_refcount_merge_extents(cur, &agbno, &aglen, adj, in xfs_refcount_adjust_cow()
1560 if (error) in xfs_refcount_adjust_cow()
1564 error = xfs_refcount_adjust_cow_extents(cur, agbno, aglen, adj); in xfs_refcount_adjust_cow()
1565 if (error) in xfs_refcount_adjust_cow()
1572 error, _RET_IP_); in xfs_refcount_adjust_cow()
1573 return error; in xfs_refcount_adjust_cow()
1688 int error; in xfs_refcount_recover_cow_leftovers() local
1705 error = xfs_trans_alloc_empty(mp, &tp); in xfs_refcount_recover_cow_leftovers()
1706 if (error) in xfs_refcount_recover_cow_leftovers()
1707 return error; in xfs_refcount_recover_cow_leftovers()
1709 error = xfs_alloc_read_agf(mp, tp, pag->pag_agno, 0, &agbp); in xfs_refcount_recover_cow_leftovers()
1710 if (error) in xfs_refcount_recover_cow_leftovers()
1719 error = xfs_btree_query_range(cur, &low, &high, in xfs_refcount_recover_cow_leftovers()
1721 xfs_btree_del_cursor(cur, error); in xfs_refcount_recover_cow_leftovers()
1724 if (error) in xfs_refcount_recover_cow_leftovers()
1730 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, 0, 0, 0, &tp); in xfs_refcount_recover_cow_leftovers()
1731 if (error) in xfs_refcount_recover_cow_leftovers()
1746 error = xfs_trans_commit(tp); in xfs_refcount_recover_cow_leftovers()
1747 if (error) in xfs_refcount_recover_cow_leftovers()
1754 return error; in xfs_refcount_recover_cow_leftovers()
1763 return error; in xfs_refcount_recover_cow_leftovers()