Lines Matching refs:cur
53 struct xfs_btree_cur *cur, in xfs_refcount_lookup_le() argument
58 trace_xfs_refcount_lookup(cur, in xfs_refcount_lookup_le()
61 cur->bc_rec.rc.rc_startblock = bno; in xfs_refcount_lookup_le()
62 cur->bc_rec.rc.rc_blockcount = 0; in xfs_refcount_lookup_le()
63 cur->bc_rec.rc.rc_domain = domain; in xfs_refcount_lookup_le()
64 return xfs_btree_lookup(cur, XFS_LOOKUP_LE, stat); in xfs_refcount_lookup_le()
73 struct xfs_btree_cur *cur, in xfs_refcount_lookup_ge() argument
78 trace_xfs_refcount_lookup(cur, in xfs_refcount_lookup_ge()
81 cur->bc_rec.rc.rc_startblock = bno; in xfs_refcount_lookup_ge()
82 cur->bc_rec.rc.rc_blockcount = 0; in xfs_refcount_lookup_ge()
83 cur->bc_rec.rc.rc_domain = domain; in xfs_refcount_lookup_ge()
84 return xfs_btree_lookup(cur, XFS_LOOKUP_GE, stat); in xfs_refcount_lookup_ge()
93 struct xfs_btree_cur *cur, in xfs_refcount_lookup_eq() argument
98 trace_xfs_refcount_lookup(cur, in xfs_refcount_lookup_eq()
101 cur->bc_rec.rc.rc_startblock = bno; in xfs_refcount_lookup_eq()
102 cur->bc_rec.rc.rc_blockcount = 0; in xfs_refcount_lookup_eq()
103 cur->bc_rec.rc.rc_domain = domain; in xfs_refcount_lookup_eq()
104 return xfs_btree_lookup(cur, XFS_LOOKUP_EQ, stat); in xfs_refcount_lookup_eq()
173 struct xfs_btree_cur *cur, in xfs_refcount_check_btrec() argument
176 if (xfs_btree_is_rtrefcount(cur->bc_ops)) in xfs_refcount_check_btrec()
177 return xfs_rtrefcount_check_irec(to_rtg(cur->bc_group), irec); in xfs_refcount_check_btrec()
178 return xfs_refcount_check_irec(to_perag(cur->bc_group), irec); in xfs_refcount_check_btrec()
183 struct xfs_btree_cur *cur, in xfs_refcount_complain_bad_rec() argument
187 struct xfs_mount *mp = cur->bc_mp; in xfs_refcount_complain_bad_rec()
189 if (xfs_btree_is_rtrefcount(cur->bc_ops)) { in xfs_refcount_complain_bad_rec()
192 cur->bc_group->xg_gno, fa); in xfs_refcount_complain_bad_rec()
196 cur->bc_group->xg_gno, fa); in xfs_refcount_complain_bad_rec()
201 xfs_btree_mark_sick(cur); in xfs_refcount_complain_bad_rec()
210 struct xfs_btree_cur *cur, in xfs_refcount_get_rec() argument
218 error = xfs_btree_get_rec(cur, &rec, stat); in xfs_refcount_get_rec()
223 fa = xfs_refcount_check_btrec(cur, irec); in xfs_refcount_get_rec()
225 return xfs_refcount_complain_bad_rec(cur, fa, irec); in xfs_refcount_get_rec()
227 trace_xfs_refcount_get(cur, irec); in xfs_refcount_get_rec()
238 struct xfs_btree_cur *cur, in xfs_refcount_update() argument
245 trace_xfs_refcount_update(cur, irec); in xfs_refcount_update()
253 error = xfs_btree_update(cur, &rec); in xfs_refcount_update()
255 trace_xfs_refcount_update_error(cur, error, _RET_IP_); in xfs_refcount_update()
266 struct xfs_btree_cur *cur, in xfs_refcount_insert() argument
272 trace_xfs_refcount_insert(cur, irec); in xfs_refcount_insert()
274 cur->bc_rec.rc.rc_startblock = irec->rc_startblock; in xfs_refcount_insert()
275 cur->bc_rec.rc.rc_blockcount = irec->rc_blockcount; in xfs_refcount_insert()
276 cur->bc_rec.rc.rc_refcount = irec->rc_refcount; in xfs_refcount_insert()
277 cur->bc_rec.rc.rc_domain = irec->rc_domain; in xfs_refcount_insert()
279 error = xfs_btree_insert(cur, i); in xfs_refcount_insert()
282 if (XFS_IS_CORRUPT(cur->bc_mp, *i != 1)) { in xfs_refcount_insert()
283 xfs_btree_mark_sick(cur); in xfs_refcount_insert()
290 trace_xfs_refcount_insert_error(cur, error, _RET_IP_); in xfs_refcount_insert()
302 struct xfs_btree_cur *cur, in xfs_refcount_delete() argument
309 error = xfs_refcount_get_rec(cur, &irec, &found_rec); in xfs_refcount_delete()
312 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_delete()
313 xfs_btree_mark_sick(cur); in xfs_refcount_delete()
317 trace_xfs_refcount_delete(cur, &irec); in xfs_refcount_delete()
318 error = xfs_btree_delete(cur, i); in xfs_refcount_delete()
319 if (XFS_IS_CORRUPT(cur->bc_mp, *i != 1)) { in xfs_refcount_delete()
320 xfs_btree_mark_sick(cur); in xfs_refcount_delete()
326 error = xfs_refcount_lookup_ge(cur, irec.rc_domain, irec.rc_startblock, in xfs_refcount_delete()
330 trace_xfs_refcount_delete_error(cur, error, _RET_IP_); in xfs_refcount_delete()
424 struct xfs_btree_cur *cur, in xfs_refcount_split_extent() argument
434 error = xfs_refcount_lookup_le(cur, domain, agbno, &found_rec); in xfs_refcount_split_extent()
440 error = xfs_refcount_get_rec(cur, &rcext, &found_rec); in xfs_refcount_split_extent()
443 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_split_extent()
444 xfs_btree_mark_sick(cur); in xfs_refcount_split_extent()
454 trace_xfs_refcount_split_extent(cur, &rcext, agbno); in xfs_refcount_split_extent()
460 error = xfs_refcount_update(cur, &tmp); in xfs_refcount_split_extent()
467 error = xfs_refcount_insert(cur, &tmp, &found_rec); in xfs_refcount_split_extent()
470 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_split_extent()
471 xfs_btree_mark_sick(cur); in xfs_refcount_split_extent()
478 trace_xfs_refcount_split_extent_error(cur, error, _RET_IP_); in xfs_refcount_split_extent()
487 struct xfs_btree_cur *cur, in xfs_refcount_merge_center_extents() argument
497 trace_xfs_refcount_merge_center_extents(cur, left, center, right); in xfs_refcount_merge_center_extents()
510 error = xfs_refcount_lookup_ge(cur, center->rc_domain, in xfs_refcount_merge_center_extents()
514 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_merge_center_extents()
515 xfs_btree_mark_sick(cur); in xfs_refcount_merge_center_extents()
520 error = xfs_refcount_delete(cur, &found_rec); in xfs_refcount_merge_center_extents()
523 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_merge_center_extents()
524 xfs_btree_mark_sick(cur); in xfs_refcount_merge_center_extents()
530 error = xfs_refcount_delete(cur, &found_rec); in xfs_refcount_merge_center_extents()
533 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_merge_center_extents()
534 xfs_btree_mark_sick(cur); in xfs_refcount_merge_center_extents()
541 error = xfs_refcount_lookup_le(cur, left->rc_domain, in xfs_refcount_merge_center_extents()
545 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_merge_center_extents()
546 xfs_btree_mark_sick(cur); in xfs_refcount_merge_center_extents()
552 error = xfs_refcount_update(cur, left); in xfs_refcount_merge_center_extents()
560 trace_xfs_refcount_merge_center_extents_error(cur, error, _RET_IP_); in xfs_refcount_merge_center_extents()
569 struct xfs_btree_cur *cur, in xfs_refcount_merge_left_extent() argument
578 trace_xfs_refcount_merge_left_extent(cur, left, cleft); in xfs_refcount_merge_left_extent()
584 error = xfs_refcount_lookup_le(cur, cleft->rc_domain, in xfs_refcount_merge_left_extent()
588 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_merge_left_extent()
589 xfs_btree_mark_sick(cur); in xfs_refcount_merge_left_extent()
594 error = xfs_refcount_delete(cur, &found_rec); in xfs_refcount_merge_left_extent()
597 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_merge_left_extent()
598 xfs_btree_mark_sick(cur); in xfs_refcount_merge_left_extent()
605 error = xfs_refcount_lookup_le(cur, left->rc_domain, in xfs_refcount_merge_left_extent()
609 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_merge_left_extent()
610 xfs_btree_mark_sick(cur); in xfs_refcount_merge_left_extent()
616 error = xfs_refcount_update(cur, left); in xfs_refcount_merge_left_extent()
625 trace_xfs_refcount_merge_left_extent_error(cur, error, _RET_IP_); in xfs_refcount_merge_left_extent()
634 struct xfs_btree_cur *cur, in xfs_refcount_merge_right_extent() argument
642 trace_xfs_refcount_merge_right_extent(cur, cright, right); in xfs_refcount_merge_right_extent()
651 error = xfs_refcount_lookup_le(cur, cright->rc_domain, in xfs_refcount_merge_right_extent()
655 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_merge_right_extent()
656 xfs_btree_mark_sick(cur); in xfs_refcount_merge_right_extent()
661 error = xfs_refcount_delete(cur, &found_rec); in xfs_refcount_merge_right_extent()
664 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_merge_right_extent()
665 xfs_btree_mark_sick(cur); in xfs_refcount_merge_right_extent()
672 error = xfs_refcount_lookup_le(cur, right->rc_domain, in xfs_refcount_merge_right_extent()
676 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_merge_right_extent()
677 xfs_btree_mark_sick(cur); in xfs_refcount_merge_right_extent()
684 error = xfs_refcount_update(cur, right); in xfs_refcount_merge_right_extent()
692 trace_xfs_refcount_merge_right_extent_error(cur, error, _RET_IP_); in xfs_refcount_merge_right_extent()
702 struct xfs_btree_cur *cur, in xfs_refcount_find_left_extents() argument
714 error = xfs_refcount_lookup_le(cur, domain, agbno - 1, &found_rec); in xfs_refcount_find_left_extents()
720 error = xfs_refcount_get_rec(cur, &tmp, &found_rec); in xfs_refcount_find_left_extents()
723 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_find_left_extents()
724 xfs_btree_mark_sick(cur); in xfs_refcount_find_left_extents()
736 error = xfs_btree_increment(cur, 0, &found_rec); in xfs_refcount_find_left_extents()
740 error = xfs_refcount_get_rec(cur, &tmp, &found_rec); in xfs_refcount_find_left_extents()
743 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_find_left_extents()
744 xfs_btree_mark_sick(cur); in xfs_refcount_find_left_extents()
781 trace_xfs_refcount_find_left_extent(cur, left, cleft, agbno); in xfs_refcount_find_left_extents()
785 trace_xfs_refcount_find_left_extent_error(cur, error, _RET_IP_); in xfs_refcount_find_left_extents()
795 struct xfs_btree_cur *cur, in xfs_refcount_find_right_extents() argument
807 error = xfs_refcount_lookup_ge(cur, domain, agbno + aglen, &found_rec); in xfs_refcount_find_right_extents()
813 error = xfs_refcount_get_rec(cur, &tmp, &found_rec); in xfs_refcount_find_right_extents()
816 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_find_right_extents()
817 xfs_btree_mark_sick(cur); in xfs_refcount_find_right_extents()
829 error = xfs_btree_decrement(cur, 0, &found_rec); in xfs_refcount_find_right_extents()
833 error = xfs_refcount_get_rec(cur, &tmp, &found_rec); in xfs_refcount_find_right_extents()
836 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_find_right_extents()
837 xfs_btree_mark_sick(cur); in xfs_refcount_find_right_extents()
874 trace_xfs_refcount_find_right_extent(cur, cright, right, in xfs_refcount_find_right_extents()
879 trace_xfs_refcount_find_right_extent_error(cur, error, _RET_IP_); in xfs_refcount_find_right_extents()
1021 struct xfs_btree_cur *cur, in xfs_refcount_merge_extents() argument
1040 error = xfs_refcount_find_left_extents(cur, &left, &cleft, domain, in xfs_refcount_merge_extents()
1044 error = xfs_refcount_find_right_extents(cur, &right, &cright, domain, in xfs_refcount_merge_extents()
1060 return xfs_refcount_merge_center_extents(cur, &left, &cleft, in xfs_refcount_merge_extents()
1067 error = xfs_refcount_merge_left_extent(cur, &left, &cleft, in xfs_refcount_merge_extents()
1083 return xfs_refcount_merge_right_extent(cur, &right, &cright, in xfs_refcount_merge_extents()
1098 struct xfs_btree_cur *cur) in xfs_refcount_still_have_space() argument
1106 overhead = xfs_allocfree_block_count(cur->bc_mp, in xfs_refcount_still_have_space()
1107 cur->bc_refc.shape_changes); in xfs_refcount_still_have_space()
1108 overhead += cur->bc_maxlevels; in xfs_refcount_still_have_space()
1109 overhead *= cur->bc_mp->m_sb.sb_blocksize; in xfs_refcount_still_have_space()
1115 if (cur->bc_refc.nr_ops > 2 && in xfs_refcount_still_have_space()
1116 XFS_TEST_ERROR(false, cur->bc_mp, in xfs_refcount_still_have_space()
1120 if (cur->bc_refc.nr_ops == 0) in xfs_refcount_still_have_space()
1122 else if (overhead > cur->bc_tp->t_log_res) in xfs_refcount_still_have_space()
1124 return cur->bc_tp->t_log_res - overhead > in xfs_refcount_still_have_space()
1125 cur->bc_refc.nr_ops * XFS_REFCOUNT_ITEM_OVERHEAD; in xfs_refcount_still_have_space()
1131 struct xfs_btree_cur *cur, in xrefc_free_extent() argument
1136 if (xfs_btree_is_rtrefcount(cur->bc_ops)) in xrefc_free_extent()
1139 return xfs_free_extent_later(cur->bc_tp, in xrefc_free_extent()
1140 xfs_gbno_to_fsb(cur->bc_group, rec->rc_startblock), in xrefc_free_extent()
1152 struct xfs_btree_cur *cur, in xfs_refcount_adjust_extents() argument
1165 error = xfs_refcount_lookup_ge(cur, XFS_REFC_DOMAIN_SHARED, *agbno, in xfs_refcount_adjust_extents()
1170 while (*aglen > 0 && xfs_refcount_still_have_space(cur)) { in xfs_refcount_adjust_extents()
1171 error = xfs_refcount_get_rec(cur, &ext, &found_rec); in xfs_refcount_adjust_extents()
1175 ext.rc_startblock = xfs_group_max_blocks(cur->bc_group); in xfs_refcount_adjust_extents()
1193 trace_xfs_refcount_modify_extent(cur, &tmp); in xfs_refcount_adjust_extents()
1199 cur->bc_refc.nr_ops++; in xfs_refcount_adjust_extents()
1201 error = xfs_refcount_insert(cur, &tmp, in xfs_refcount_adjust_extents()
1205 if (XFS_IS_CORRUPT(cur->bc_mp, in xfs_refcount_adjust_extents()
1207 xfs_btree_mark_sick(cur); in xfs_refcount_adjust_extents()
1212 error = xrefc_free_extent(cur, &tmp); in xfs_refcount_adjust_extents()
1221 if (*aglen == 0 || !xfs_refcount_still_have_space(cur)) in xfs_refcount_adjust_extents()
1225 error = xfs_refcount_lookup_ge(cur, in xfs_refcount_adjust_extents()
1239 if (XFS_IS_CORRUPT(cur->bc_mp, ext.rc_blockcount == 0) || in xfs_refcount_adjust_extents()
1240 XFS_IS_CORRUPT(cur->bc_mp, ext.rc_blockcount > *aglen)) { in xfs_refcount_adjust_extents()
1241 xfs_btree_mark_sick(cur); in xfs_refcount_adjust_extents()
1253 trace_xfs_refcount_modify_extent(cur, &ext); in xfs_refcount_adjust_extents()
1254 cur->bc_refc.nr_ops++; in xfs_refcount_adjust_extents()
1256 error = xfs_refcount_update(cur, &ext); in xfs_refcount_adjust_extents()
1260 error = xfs_refcount_delete(cur, &found_rec); in xfs_refcount_adjust_extents()
1263 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_adjust_extents()
1264 xfs_btree_mark_sick(cur); in xfs_refcount_adjust_extents()
1270 error = xrefc_free_extent(cur, &ext); in xfs_refcount_adjust_extents()
1276 error = xfs_btree_increment(cur, 0, &found_rec); in xfs_refcount_adjust_extents()
1287 trace_xfs_refcount_modify_extent_error(cur, error, _RET_IP_); in xfs_refcount_adjust_extents()
1294 struct xfs_btree_cur *cur, in xfs_refcount_adjust() argument
1304 trace_xfs_refcount_increase(cur, *agbno, *aglen); in xfs_refcount_adjust()
1306 trace_xfs_refcount_decrease(cur, *agbno, *aglen); in xfs_refcount_adjust()
1311 error = xfs_refcount_split_extent(cur, XFS_REFC_DOMAIN_SHARED, in xfs_refcount_adjust()
1318 error = xfs_refcount_split_extent(cur, XFS_REFC_DOMAIN_SHARED, in xfs_refcount_adjust()
1328 error = xfs_refcount_merge_extents(cur, XFS_REFC_DOMAIN_SHARED, in xfs_refcount_adjust()
1335 cur->bc_refc.shape_changes++; in xfs_refcount_adjust()
1338 error = xfs_refcount_adjust_extents(cur, agbno, aglen, adj); in xfs_refcount_adjust()
1345 trace_xfs_refcount_adjust_error(cur, error, _RET_IP_); in xfs_refcount_adjust()
1355 struct xfs_btree_cur *cur, in xfs_refcount_continue_op() argument
1359 struct xfs_mount *mp = cur->bc_mp; in xfs_refcount_continue_op()
1360 struct xfs_perag *pag = to_perag(cur->bc_group); in xfs_refcount_continue_op()
1364 xfs_btree_mark_sick(cur); in xfs_refcount_continue_op()
1473 struct xfs_btree_cur *cur, in xfs_rtrefcount_continue_op() argument
1477 struct xfs_mount *mp = cur->bc_mp; in xfs_rtrefcount_continue_op()
1482 xfs_btree_mark_sick(cur); in xfs_rtrefcount_continue_op()
1641 struct xfs_btree_cur *cur, in xfs_refcount_find_shared() argument
1653 trace_xfs_refcount_find_shared(cur, agbno, aglen); in xfs_refcount_find_shared()
1660 error = xfs_refcount_lookup_le(cur, XFS_REFC_DOMAIN_SHARED, agbno, in xfs_refcount_find_shared()
1666 error = xfs_btree_increment(cur, 0, &have); in xfs_refcount_find_shared()
1672 error = xfs_refcount_get_rec(cur, &tmp, &i); in xfs_refcount_find_shared()
1675 if (XFS_IS_CORRUPT(cur->bc_mp, i != 1)) { in xfs_refcount_find_shared()
1676 xfs_btree_mark_sick(cur); in xfs_refcount_find_shared()
1685 error = xfs_btree_increment(cur, 0, &have); in xfs_refcount_find_shared()
1690 error = xfs_refcount_get_rec(cur, &tmp, &i); in xfs_refcount_find_shared()
1693 if (XFS_IS_CORRUPT(cur->bc_mp, i != 1)) { in xfs_refcount_find_shared()
1694 xfs_btree_mark_sick(cur); in xfs_refcount_find_shared()
1719 error = xfs_btree_increment(cur, 0, &have); in xfs_refcount_find_shared()
1724 error = xfs_refcount_get_rec(cur, &tmp, &i); in xfs_refcount_find_shared()
1727 if (XFS_IS_CORRUPT(cur->bc_mp, i != 1)) { in xfs_refcount_find_shared()
1728 xfs_btree_mark_sick(cur); in xfs_refcount_find_shared()
1740 trace_xfs_refcount_find_shared_result(cur, *fbno, *flen); in xfs_refcount_find_shared()
1744 trace_xfs_refcount_find_shared_error(cur, error, _RET_IP_); in xfs_refcount_find_shared()
1802 struct xfs_btree_cur *cur, in xfs_refcount_adjust_cow_extents() argument
1815 error = xfs_refcount_lookup_ge(cur, XFS_REFC_DOMAIN_COW, agbno, in xfs_refcount_adjust_cow_extents()
1819 error = xfs_refcount_get_rec(cur, &ext, &found_rec); in xfs_refcount_adjust_cow_extents()
1822 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec && in xfs_refcount_adjust_cow_extents()
1824 xfs_btree_mark_sick(cur); in xfs_refcount_adjust_cow_extents()
1829 ext.rc_startblock = xfs_group_max_blocks(cur->bc_group); in xfs_refcount_adjust_cow_extents()
1838 if (XFS_IS_CORRUPT(cur->bc_mp, in xfs_refcount_adjust_cow_extents()
1840 xfs_btree_mark_sick(cur); in xfs_refcount_adjust_cow_extents()
1850 trace_xfs_refcount_modify_extent(cur, &tmp); in xfs_refcount_adjust_cow_extents()
1852 error = xfs_refcount_insert(cur, &tmp, in xfs_refcount_adjust_cow_extents()
1856 if (XFS_IS_CORRUPT(cur->bc_mp, found_tmp != 1)) { in xfs_refcount_adjust_cow_extents()
1857 xfs_btree_mark_sick(cur); in xfs_refcount_adjust_cow_extents()
1864 if (XFS_IS_CORRUPT(cur->bc_mp, ext.rc_startblock != agbno)) { in xfs_refcount_adjust_cow_extents()
1865 xfs_btree_mark_sick(cur); in xfs_refcount_adjust_cow_extents()
1869 if (XFS_IS_CORRUPT(cur->bc_mp, ext.rc_blockcount != aglen)) { in xfs_refcount_adjust_cow_extents()
1870 xfs_btree_mark_sick(cur); in xfs_refcount_adjust_cow_extents()
1874 if (XFS_IS_CORRUPT(cur->bc_mp, ext.rc_refcount != 1)) { in xfs_refcount_adjust_cow_extents()
1875 xfs_btree_mark_sick(cur); in xfs_refcount_adjust_cow_extents()
1881 trace_xfs_refcount_modify_extent(cur, &ext); in xfs_refcount_adjust_cow_extents()
1882 error = xfs_refcount_delete(cur, &found_rec); in xfs_refcount_adjust_cow_extents()
1885 if (XFS_IS_CORRUPT(cur->bc_mp, found_rec != 1)) { in xfs_refcount_adjust_cow_extents()
1886 xfs_btree_mark_sick(cur); in xfs_refcount_adjust_cow_extents()
1897 trace_xfs_refcount_modify_extent_error(cur, error, _RET_IP_); in xfs_refcount_adjust_cow_extents()
1906 struct xfs_btree_cur *cur, in xfs_refcount_adjust_cow() argument
1917 error = xfs_refcount_split_extent(cur, XFS_REFC_DOMAIN_COW, in xfs_refcount_adjust_cow()
1922 error = xfs_refcount_split_extent(cur, XFS_REFC_DOMAIN_COW, in xfs_refcount_adjust_cow()
1930 error = xfs_refcount_merge_extents(cur, XFS_REFC_DOMAIN_COW, &agbno, in xfs_refcount_adjust_cow()
1936 error = xfs_refcount_adjust_cow_extents(cur, agbno, aglen, adj); in xfs_refcount_adjust_cow()
1943 trace_xfs_refcount_adjust_cow_error(cur, error, _RET_IP_); in xfs_refcount_adjust_cow()
2024 struct xfs_btree_cur *cur, in xfs_refcount_recover_extent() argument
2031 if (XFS_IS_CORRUPT(cur->bc_mp, in xfs_refcount_recover_extent()
2033 xfs_btree_mark_sick(cur); in xfs_refcount_recover_extent()
2042 if (xfs_refcount_check_btrec(cur, &rr->rr_rrec) != NULL || in xfs_refcount_recover_extent()
2043 XFS_IS_CORRUPT(cur->bc_mp, in xfs_refcount_recover_extent()
2045 xfs_btree_mark_sick(cur); in xfs_refcount_recover_extent()
2062 struct xfs_btree_cur *cur; in xfs_refcount_recover_cow_leftovers() local
2108 cur = xfs_rtrefcountbt_init_cursor(tp, to_rtg(xg)); in xfs_refcount_recover_cow_leftovers()
2113 cur = xfs_refcountbt_init_cursor(mp, tp, agbp, to_perag(xg)); in xfs_refcount_recover_cow_leftovers()
2117 error = xfs_btree_query_range(cur, &low, &high, in xfs_refcount_recover_cow_leftovers()
2119 xfs_btree_del_cursor(cur, error); in xfs_refcount_recover_cow_leftovers()
2174 struct xfs_btree_cur *cur, in xfs_refcount_has_records() argument
2189 return xfs_btree_has_records(cur, &low, &high, NULL, outcome); in xfs_refcount_has_records()
2200 struct xfs_btree_cur *cur, in xfs_refcount_query_range_helper() argument
2209 fa = xfs_refcount_check_btrec(cur, &irec); in xfs_refcount_query_range_helper()
2211 return xfs_refcount_complain_bad_rec(cur, fa, &irec); in xfs_refcount_query_range_helper()
2213 return query->fn(cur, &irec, query->priv); in xfs_refcount_query_range_helper()
2219 struct xfs_btree_cur *cur, in xfs_refcount_query_range() argument
2229 return xfs_btree_query_range(cur, &low_brec, &high_brec, in xfs_refcount_query_range()