• Home
  • Raw
  • Download

Lines Matching refs:error

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