Lines Matching defs:cur

31  * in the btree given by cur.
35 struct xfs_btree_cur *cur,
46 cur->bc_rec.r.rm_startblock = bno;
47 cur->bc_rec.r.rm_blockcount = 0;
48 cur->bc_rec.r.rm_owner = owner;
49 cur->bc_rec.r.rm_offset = offset;
50 cur->bc_rec.r.rm_flags = flags;
52 error = xfs_btree_lookup(cur, XFS_LOOKUP_LE, stat);
56 error = xfs_rmap_get_rec(cur, irec, &get_stat);
67 * in the btree given by cur.
71 struct xfs_btree_cur *cur,
79 cur->bc_rec.r.rm_startblock = bno;
80 cur->bc_rec.r.rm_blockcount = len;
81 cur->bc_rec.r.rm_owner = owner;
82 cur->bc_rec.r.rm_offset = offset;
83 cur->bc_rec.r.rm_flags = flags;
84 return xfs_btree_lookup(cur, XFS_LOOKUP_EQ, stat);
88 * Update the record referred to by cur to the value given
94 struct xfs_btree_cur *cur,
100 trace_xfs_rmap_update(cur->bc_mp, cur->bc_ag.pag->pag_agno,
109 error = xfs_btree_update(cur, &rec);
111 trace_xfs_rmap_update_error(cur->bc_mp,
112 cur->bc_ag.pag->pag_agno, error, _RET_IP_);
211 struct xfs_btree_cur *cur,
214 struct xfs_mount *mp = cur->bc_mp;
229 if (!xfs_verify_agbext(cur->bc_ag.pag, irec->rm_startblock,
267 struct xfs_btree_cur *cur,
271 struct xfs_mount *mp = cur->bc_mp;
275 cur->bc_ag.pag->pag_agno, fa);
288 struct xfs_btree_cur *cur,
296 error = xfs_btree_get_rec(cur, &rec, stat);
302 fa = xfs_rmap_check_irec(cur, irec);
304 return xfs_rmap_complain_bad_rec(cur, fa, irec);
317 struct xfs_btree_cur *cur,
323 trace_xfs_rmap_find_left_neighbor_candidate(cur->bc_mp,
324 cur->bc_ag.pag->pag_agno, rec->rm_startblock,
346 struct xfs_btree_cur *cur,
374 trace_xfs_rmap_find_left_neighbor_query(cur->bc_mp,
375 cur->bc_ag.pag->pag_agno, bno, 0, owner, offset, flags);
393 error = xfs_rmap_lookup_le(cur, bno, owner, offset, flags, irec,
398 error = xfs_rmap_find_left_neighbor_helper(cur, irec, &info);
400 error = xfs_rmap_query_range(cur, &info.high, &info.high,
406 trace_xfs_rmap_find_left_neighbor_result(cur->bc_mp,
407 cur->bc_ag.pag->pag_agno, irec->rm_startblock,
416 struct xfs_btree_cur *cur,
422 trace_xfs_rmap_lookup_le_range_candidate(cur->bc_mp,
423 cur->bc_ag.pag->pag_agno, rec->rm_startblock,
447 struct xfs_btree_cur *cur,
470 trace_xfs_rmap_lookup_le_range(cur->bc_mp, cur->bc_ag.pag->pag_agno,
489 error = xfs_rmap_lookup_le(cur, bno, owner, offset, flags, irec,
494 error = xfs_rmap_lookup_le_range_helper(cur, irec, &info);
496 error = xfs_rmap_query_range(cur, &info.high, &info.high,
502 trace_xfs_rmap_lookup_le_range_result(cur->bc_mp,
503 cur->bc_ag.pag->pag_agno, irec->rm_startblock,
588 struct xfs_btree_cur *cur,
594 struct xfs_mount *mp = cur->bc_mp;
609 trace_xfs_rmap_unmap(mp, cur->bc_ag.pag->pag_agno, bno, len,
617 error = xfs_rmap_lookup_le(cur, bno, owner, offset, flags, &ltrec, &i);
625 trace_xfs_rmap_lookup_le_range_result(cur->bc_mp,
626 cur->bc_ag.pag->pag_agno, ltrec.rm_startblock,
659 error = xfs_btree_increment(cur, 0, &i);
664 error = xfs_rmap_get_rec(cur, &rtrec, &i);
692 trace_xfs_rmap_delete(mp, cur->bc_ag.pag->pag_agno,
696 error = xfs_btree_delete(cur, &i);
718 error = xfs_rmap_update(cur, &ltrec);
733 error = xfs_rmap_update(cur, &ltrec);
753 error = xfs_rmap_update(cur, &ltrec);
757 error = xfs_btree_increment(cur, 0, &i);
761 cur->bc_rec.r.rm_startblock = bno + len;
762 cur->bc_rec.r.rm_blockcount = orig_len - len -
764 cur->bc_rec.r.rm_owner = ltrec.rm_owner;
766 cur->bc_rec.r.rm_offset = 0;
768 cur->bc_rec.r.rm_offset = offset + len;
769 cur->bc_rec.r.rm_flags = flags;
770 trace_xfs_rmap_insert(mp, cur->bc_ag.pag->pag_agno,
771 cur->bc_rec.r.rm_startblock,
772 cur->bc_rec.r.rm_blockcount,
773 cur->bc_rec.r.rm_owner,
774 cur->bc_rec.r.rm_offset,
775 cur->bc_rec.r.rm_flags);
776 error = xfs_btree_insert(cur, &i);
782 trace_xfs_rmap_unmap_done(mp, cur->bc_ag.pag->pag_agno, bno, len,
786 trace_xfs_rmap_unmap_error(mp, cur->bc_ag.pag->pag_agno,
804 struct xfs_btree_cur *cur;
810 cur = xfs_rmapbt_init_cursor(mp, tp, agbp, pag);
812 error = xfs_rmap_unmap(cur, bno, len, false, oinfo);
814 xfs_btree_del_cursor(cur, error);
853 struct xfs_btree_cur *cur,
859 struct xfs_mount *mp = cur->bc_mp;
877 trace_xfs_rmap_map(mp, cur->bc_ag.pag->pag_agno, bno, len,
886 error = xfs_rmap_lookup_le(cur, bno, owner, offset, flags, &ltrec,
891 trace_xfs_rmap_lookup_le_range_result(cur->bc_mp,
892 cur->bc_ag.pag->pag_agno, ltrec.rm_startblock,
912 error = xfs_btree_increment(cur, 0, &have_gt);
916 error = xfs_rmap_get_rec(cur, &gtrec, &have_gt);
927 trace_xfs_rmap_find_right_neighbor_result(cur->bc_mp,
928 cur->bc_ag.pag->pag_agno, gtrec.rm_startblock,
967 trace_xfs_rmap_delete(mp, cur->bc_ag.pag->pag_agno,
973 error = xfs_btree_delete(cur, &i);
983 error = xfs_btree_decrement(cur, 0, &have_gt);
986 error = xfs_rmap_update(cur, &ltrec);
1005 error = xfs_rmap_update(cur, &gtrec);
1013 cur->bc_rec.r.rm_startblock = bno;
1014 cur->bc_rec.r.rm_blockcount = len;
1015 cur->bc_rec.r.rm_owner = owner;
1016 cur->bc_rec.r.rm_offset = offset;
1017 cur->bc_rec.r.rm_flags = flags;
1018 trace_xfs_rmap_insert(mp, cur->bc_ag.pag->pag_agno, bno, len,
1020 error = xfs_btree_insert(cur, &i);
1029 trace_xfs_rmap_map_done(mp, cur->bc_ag.pag->pag_agno, bno, len,
1033 trace_xfs_rmap_map_error(mp, cur->bc_ag.pag->pag_agno,
1051 struct xfs_btree_cur *cur;
1057 cur = xfs_rmapbt_init_cursor(mp, tp, agbp, pag);
1058 error = xfs_rmap_map(cur, bno, len, false, oinfo);
1060 xfs_btree_del_cursor(cur, error);
1082 struct xfs_btree_cur *cur,
1088 struct xfs_mount *mp = cur->bc_mp;
1107 trace_xfs_rmap_convert(mp, cur->bc_ag.pag->pag_agno, bno, len,
1115 error = xfs_rmap_lookup_le(cur, bno, owner, offset, oldext, &PREV, &i);
1123 trace_xfs_rmap_lookup_le_range_result(cur->bc_mp,
1124 cur->bc_ag.pag->pag_agno, PREV.rm_startblock,
1147 error = xfs_btree_decrement(cur, 0, &i);
1152 error = xfs_rmap_get_rec(cur, &LEFT, &i);
1165 trace_xfs_rmap_find_left_neighbor_result(cur->bc_mp,
1166 cur->bc_ag.pag->pag_agno, LEFT.rm_startblock,
1180 error = xfs_btree_increment(cur, 0, &i);
1187 error = xfs_btree_increment(cur, 0, &i);
1192 error = xfs_rmap_get_rec(cur, &RIGHT, &i);
1203 trace_xfs_rmap_find_right_neighbor_result(cur->bc_mp,
1204 cur->bc_ag.pag->pag_agno, RIGHT.rm_startblock,
1222 trace_xfs_rmap_convert_state(mp, cur->bc_ag.pag->pag_agno, state,
1226 error = xfs_rmap_lookup_le(cur, bno, owner, offset, oldext, NULL, &i);
1245 error = xfs_btree_increment(cur, 0, &i);
1252 trace_xfs_rmap_delete(mp, cur->bc_ag.pag->pag_agno,
1256 error = xfs_btree_delete(cur, &i);
1263 error = xfs_btree_decrement(cur, 0, &i);
1270 trace_xfs_rmap_delete(mp, cur->bc_ag.pag->pag_agno,
1274 error = xfs_btree_delete(cur, &i);
1281 error = xfs_btree_decrement(cur, 0, &i);
1290 error = xfs_rmap_update(cur, &NEW);
1300 trace_xfs_rmap_delete(mp, cur->bc_ag.pag->pag_agno,
1304 error = xfs_btree_delete(cur, &i);
1311 error = xfs_btree_decrement(cur, 0, &i);
1320 error = xfs_rmap_update(cur, &NEW);
1330 error = xfs_btree_increment(cur, 0, &i);
1337 trace_xfs_rmap_delete(mp, cur->bc_ag.pag->pag_agno,
1341 error = xfs_btree_delete(cur, &i);
1348 error = xfs_btree_decrement(cur, 0, &i);
1358 error = xfs_rmap_update(cur, &NEW);
1371 error = xfs_rmap_update(cur, &NEW);
1385 error = xfs_rmap_update(cur, &NEW);
1388 error = xfs_btree_decrement(cur, 0, &i);
1393 error = xfs_rmap_update(cur, &NEW);
1407 error = xfs_rmap_update(cur, &NEW);
1415 cur->bc_rec.r = NEW;
1416 trace_xfs_rmap_insert(mp, cur->bc_ag.pag->pag_agno, bno,
1418 error = xfs_btree_insert(cur, &i);
1434 error = xfs_rmap_update(cur, &NEW);
1437 error = xfs_btree_increment(cur, 0, &i);
1444 error = xfs_rmap_update(cur, &NEW);
1456 error = xfs_rmap_update(cur, &NEW);
1459 error = xfs_rmap_lookup_eq(cur, bno, len, owner, offset,
1472 cur->bc_rec.r = NEW;
1473 trace_xfs_rmap_insert(mp, cur->bc_ag.pag->pag_agno, bno,
1475 error = xfs_btree_insert(cur, &i);
1497 error = xfs_rmap_update(cur, &NEW);
1503 cur->bc_rec.r = NEW;
1504 trace_xfs_rmap_insert(mp, cur->bc_ag.pag->pag_agno,
1508 error = xfs_btree_insert(cur, &i);
1520 error = xfs_rmap_lookup_eq(cur, bno, len, owner, offset,
1529 cur->bc_rec.r.rm_flags &= ~XFS_RMAP_UNWRITTEN;
1530 cur->bc_rec.r.rm_flags |= newext;
1531 trace_xfs_rmap_insert(mp, cur->bc_ag.pag->pag_agno, bno, len,
1533 error = xfs_btree_insert(cur, &i);
1555 trace_xfs_rmap_convert_done(mp, cur->bc_ag.pag->pag_agno, bno, len,
1559 trace_xfs_rmap_convert_error(cur->bc_mp,
1560 cur->bc_ag.pag->pag_agno, error, _RET_IP_);
1571 struct xfs_btree_cur *cur,
1577 struct xfs_mount *mp = cur->bc_mp;
1596 trace_xfs_rmap_convert(mp, cur->bc_ag.pag->pag_agno, bno, len,
1604 error = xfs_rmap_lookup_le_range(cur, bno, owner, offset, oldext,
1628 error = xfs_rmap_find_left_neighbor(cur, bno, owner, offset, newext,
1645 error = xfs_rmap_lookup_eq(cur, bno + len, len, owner, offset + len,
1651 error = xfs_rmap_get_rec(cur, &RIGHT, &i);
1662 trace_xfs_rmap_find_right_neighbor_result(cur->bc_mp,
1663 cur->bc_ag.pag->pag_agno, RIGHT.rm_startblock,
1679 trace_xfs_rmap_convert_state(mp, cur->bc_ag.pag->pag_agno, state,
1692 error = xfs_rmap_delete(cur, RIGHT.rm_startblock,
1697 error = xfs_rmap_delete(cur, PREV.rm_startblock,
1703 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock,
1713 error = xfs_rmap_update(cur, &NEW);
1723 error = xfs_rmap_delete(cur, PREV.rm_startblock,
1729 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock,
1739 error = xfs_rmap_update(cur, &NEW);
1749 error = xfs_rmap_delete(cur, RIGHT.rm_startblock,
1755 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock,
1766 error = xfs_rmap_update(cur, &NEW);
1778 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock,
1788 error = xfs_rmap_update(cur, &NEW);
1799 error = xfs_rmap_delete(cur, NEW.rm_startblock,
1807 error = xfs_rmap_insert(cur, NEW.rm_startblock,
1813 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock,
1823 error = xfs_rmap_update(cur, &NEW);
1834 error = xfs_rmap_delete(cur, NEW.rm_startblock,
1842 error = xfs_rmap_insert(cur, NEW.rm_startblock,
1847 error = xfs_rmap_insert(cur, bno, len, owner, offset, newext);
1858 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock,
1868 error = xfs_rmap_update(cur, &NEW);
1872 error = xfs_rmap_delete(cur, NEW.rm_startblock,
1880 error = xfs_rmap_insert(cur, NEW.rm_startblock,
1893 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock,
1903 error = xfs_rmap_update(cur, &NEW);
1906 error = xfs_rmap_insert(cur, bno, len, owner, offset, newext);
1924 error = xfs_rmap_insert(cur, NEW.rm_startblock,
1931 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock,
1941 error = xfs_rmap_update(cur, &NEW);
1950 error = xfs_rmap_insert(cur, NEW.rm_startblock,
1970 trace_xfs_rmap_convert_done(mp, cur->bc_ag.pag->pag_agno, bno, len,
1974 trace_xfs_rmap_convert_error(cur->bc_mp,
1975 cur->bc_ag.pag->pag_agno, error, _RET_IP_);
1995 struct xfs_btree_cur *cur,
2001 struct xfs_mount *mp = cur->bc_mp;
2013 trace_xfs_rmap_unmap(mp, cur->bc_ag.pag->pag_agno, bno, len,
2021 error = xfs_rmap_lookup_le_range(cur, bno, owner, offset, flags,
2066 error = xfs_rmap_delete(cur, ltrec.rm_startblock,
2084 error = xfs_rmap_delete(cur, ltrec.rm_startblock,
2094 error = xfs_rmap_insert(cur, ltrec.rm_startblock,
2110 error = xfs_rmap_lookup_eq(cur, ltrec.rm_startblock,
2120 error = xfs_rmap_update(cur, &ltrec);
2139 error = xfs_rmap_lookup_eq(cur, ltrec.rm_startblock,
2149 error = xfs_rmap_update(cur, &ltrec);
2154 error = xfs_rmap_insert(cur, bno + len,
2162 trace_xfs_rmap_unmap_done(mp, cur->bc_ag.pag->pag_agno, bno, len,
2166 trace_xfs_rmap_unmap_error(cur->bc_mp,
2167 cur->bc_ag.pag->pag_agno, error, _RET_IP_);
2182 struct xfs_btree_cur *cur,
2188 struct xfs_mount *mp = cur->bc_mp;
2202 trace_xfs_rmap_map(mp, cur->bc_ag.pag->pag_agno, bno, len,
2206 error = xfs_rmap_find_left_neighbor(cur, bno, owner, offset, flags,
2215 error = xfs_rmap_lookup_eq(cur, bno + len, len, owner, offset + len,
2220 error = xfs_rmap_get_rec(cur, &gtrec, &have_gt);
2227 trace_xfs_rmap_find_right_neighbor_result(cur->bc_mp,
2228 cur->bc_ag.pag->pag_agno, gtrec.rm_startblock,
2262 error = xfs_rmap_delete(cur, gtrec.rm_startblock,
2270 error = xfs_rmap_lookup_eq(cur, ltrec.rm_startblock,
2280 error = xfs_rmap_update(cur, &ltrec);
2296 error = xfs_rmap_delete(cur, gtrec.rm_startblock,
2306 error = xfs_rmap_insert(cur, gtrec.rm_startblock,
2316 error = xfs_rmap_insert(cur, bno, len, owner, offset, flags);
2321 trace_xfs_rmap_map_done(mp, cur->bc_ag.pag->pag_agno, bno, len,
2325 trace_xfs_rmap_map_error(cur->bc_mp,
2326 cur->bc_ag.pag->pag_agno, error, _RET_IP_);
2333 struct xfs_btree_cur *cur,
2347 return xfs_rmap_map(cur, rmap->rm_startblock,
2352 return xfs_rmap_map_shared(cur, rmap->rm_startblock,
2366 struct xfs_btree_cur *cur,
2376 fa = xfs_rmap_check_irec(cur, &irec);
2378 return xfs_rmap_complain_bad_rec(cur, fa, &irec);
2380 return query->fn(cur, &irec, query->priv);
2386 struct xfs_btree_cur *cur,
2396 return xfs_btree_query_range(cur, &low_brec, &high_brec,
2403 struct xfs_btree_cur *cur,
2411 return xfs_btree_query_all(cur, xfs_rmap_query_range_helper, &query);
2715 struct xfs_btree_cur *cur,
2731 return xfs_btree_has_records(cur, &low, &high, &mask, outcome);
2793 struct xfs_btree_cur *cur,
2832 if (xfs_rmap_shareable(cur->bc_mp, &roc->good) ^
2833 xfs_rmap_shareable(cur->bc_mp, &check))
2846 struct xfs_btree_cur *cur,
2856 error = xfs_rmap_query_range(cur, &roc.low, &roc.high,
2877 struct xfs_btree_cur *cur,
2890 error = xfs_rmap_query_range(cur, &roc.low, &roc.high,