Lines Matching defs:cur
27 * in the btree given by cur.
31 struct xfs_btree_cur *cur,
39 cur->bc_rec.r.rm_startblock = bno;
40 cur->bc_rec.r.rm_blockcount = len;
41 cur->bc_rec.r.rm_owner = owner;
42 cur->bc_rec.r.rm_offset = offset;
43 cur->bc_rec.r.rm_flags = flags;
44 return xfs_btree_lookup(cur, XFS_LOOKUP_LE, stat);
49 * in the btree given by cur.
53 struct xfs_btree_cur *cur,
61 cur->bc_rec.r.rm_startblock = bno;
62 cur->bc_rec.r.rm_blockcount = len;
63 cur->bc_rec.r.rm_owner = owner;
64 cur->bc_rec.r.rm_offset = offset;
65 cur->bc_rec.r.rm_flags = flags;
66 return xfs_btree_lookup(cur, XFS_LOOKUP_EQ, stat);
70 * Update the record referred to by cur to the value given
76 struct xfs_btree_cur *cur,
82 trace_xfs_rmap_update(cur->bc_mp, cur->bc_ag.agno,
91 error = xfs_btree_update(cur, &rec);
93 trace_xfs_rmap_update_error(cur->bc_mp,
94 cur->bc_ag.agno, error, _RET_IP_);
195 struct xfs_btree_cur *cur,
199 struct xfs_mount *mp = cur->bc_mp;
200 xfs_agnumber_t agno = cur->bc_ag.agno;
204 error = xfs_btree_get_rec(cur, &rec, stat);
256 struct xfs_btree_cur *cur,
262 trace_xfs_rmap_find_left_neighbor_candidate(cur->bc_mp,
263 cur->bc_ag.agno, rec->rm_startblock,
286 struct xfs_btree_cur *cur,
314 trace_xfs_rmap_find_left_neighbor_query(cur->bc_mp,
315 cur->bc_ag.agno, bno, 0, owner, offset, flags);
317 error = xfs_rmap_query_range(cur, &info.high, &info.high,
322 trace_xfs_rmap_find_left_neighbor_result(cur->bc_mp,
323 cur->bc_ag.agno, irec->rm_startblock,
332 struct xfs_btree_cur *cur,
338 trace_xfs_rmap_lookup_le_range_candidate(cur->bc_mp,
339 cur->bc_ag.agno, rec->rm_startblock,
364 struct xfs_btree_cur *cur,
387 trace_xfs_rmap_lookup_le_range(cur->bc_mp,
388 cur->bc_ag.agno, bno, 0, owner, offset, flags);
389 error = xfs_rmap_query_range(cur, &info.high, &info.high,
394 trace_xfs_rmap_lookup_le_range_result(cur->bc_mp,
395 cur->bc_ag.agno, irec->rm_startblock,
480 struct xfs_btree_cur *cur,
486 struct xfs_mount *mp = cur->bc_mp;
501 trace_xfs_rmap_unmap(mp, cur->bc_ag.agno, bno, len,
509 error = xfs_rmap_lookup_le(cur, bno, len, owner, offset, flags, &i);
517 error = xfs_rmap_get_rec(cur, <rec, &i);
524 trace_xfs_rmap_lookup_le_range_result(cur->bc_mp,
525 cur->bc_ag.agno, ltrec.rm_startblock,
558 error = xfs_btree_increment(cur, 0, &i);
563 error = xfs_rmap_get_rec(cur, &rtrec, &i);
591 trace_xfs_rmap_delete(mp, cur->bc_ag.agno,
595 error = xfs_btree_delete(cur, &i);
617 error = xfs_rmap_update(cur, <rec);
632 error = xfs_rmap_update(cur, <rec);
652 error = xfs_rmap_update(cur, <rec);
656 error = xfs_btree_increment(cur, 0, &i);
660 cur->bc_rec.r.rm_startblock = bno + len;
661 cur->bc_rec.r.rm_blockcount = orig_len - len -
663 cur->bc_rec.r.rm_owner = ltrec.rm_owner;
665 cur->bc_rec.r.rm_offset = 0;
667 cur->bc_rec.r.rm_offset = offset + len;
668 cur->bc_rec.r.rm_flags = flags;
669 trace_xfs_rmap_insert(mp, cur->bc_ag.agno,
670 cur->bc_rec.r.rm_startblock,
671 cur->bc_rec.r.rm_blockcount,
672 cur->bc_rec.r.rm_owner,
673 cur->bc_rec.r.rm_offset,
674 cur->bc_rec.r.rm_flags);
675 error = xfs_btree_insert(cur, &i);
681 trace_xfs_rmap_unmap_done(mp, cur->bc_ag.agno, bno, len,
685 trace_xfs_rmap_unmap_error(mp, cur->bc_ag.agno,
703 struct xfs_btree_cur *cur;
709 cur = xfs_rmapbt_init_cursor(mp, tp, agbp, agno);
711 error = xfs_rmap_unmap(cur, bno, len, false, oinfo);
713 xfs_btree_del_cursor(cur, error);
752 struct xfs_btree_cur *cur,
758 struct xfs_mount *mp = cur->bc_mp;
776 trace_xfs_rmap_map(mp, cur->bc_ag.agno, bno, len,
785 error = xfs_rmap_lookup_le(cur, bno, len, owner, offset, flags,
790 error = xfs_rmap_get_rec(cur, <rec, &have_lt);
797 trace_xfs_rmap_lookup_le_range_result(cur->bc_mp,
798 cur->bc_ag.agno, ltrec.rm_startblock,
818 error = xfs_btree_increment(cur, 0, &have_gt);
822 error = xfs_rmap_get_rec(cur, >rec, &have_gt);
833 trace_xfs_rmap_find_right_neighbor_result(cur->bc_mp,
834 cur->bc_ag.agno, gtrec.rm_startblock,
873 trace_xfs_rmap_delete(mp, cur->bc_ag.agno,
879 error = xfs_btree_delete(cur, &i);
889 error = xfs_btree_decrement(cur, 0, &have_gt);
892 error = xfs_rmap_update(cur, <rec);
911 error = xfs_rmap_update(cur, >rec);
919 cur->bc_rec.r.rm_startblock = bno;
920 cur->bc_rec.r.rm_blockcount = len;
921 cur->bc_rec.r.rm_owner = owner;
922 cur->bc_rec.r.rm_offset = offset;
923 cur->bc_rec.r.rm_flags = flags;
924 trace_xfs_rmap_insert(mp, cur->bc_ag.agno, bno, len,
926 error = xfs_btree_insert(cur, &i);
935 trace_xfs_rmap_map_done(mp, cur->bc_ag.agno, bno, len,
939 trace_xfs_rmap_map_error(mp, cur->bc_ag.agno,
957 struct xfs_btree_cur *cur;
963 cur = xfs_rmapbt_init_cursor(mp, tp, agbp, agno);
964 error = xfs_rmap_map(cur, bno, len, false, oinfo);
966 xfs_btree_del_cursor(cur, error);
988 struct xfs_btree_cur *cur,
994 struct xfs_mount *mp = cur->bc_mp;
1013 trace_xfs_rmap_convert(mp, cur->bc_ag.agno, bno, len,
1021 error = xfs_rmap_lookup_le(cur, bno, len, owner, offset, oldext, &i);
1029 error = xfs_rmap_get_rec(cur, &PREV, &i);
1036 trace_xfs_rmap_lookup_le_range_result(cur->bc_mp,
1037 cur->bc_ag.agno, PREV.rm_startblock,
1060 error = xfs_btree_decrement(cur, 0, &i);
1065 error = xfs_rmap_get_rec(cur, &LEFT, &i);
1078 trace_xfs_rmap_find_left_neighbor_result(cur->bc_mp,
1079 cur->bc_ag.agno, LEFT.rm_startblock,
1093 error = xfs_btree_increment(cur, 0, &i);
1100 error = xfs_btree_increment(cur, 0, &i);
1105 error = xfs_rmap_get_rec(cur, &RIGHT, &i);
1116 trace_xfs_rmap_find_right_neighbor_result(cur->bc_mp,
1117 cur->bc_ag.agno, RIGHT.rm_startblock,
1135 trace_xfs_rmap_convert_state(mp, cur->bc_ag.agno, state,
1139 error = xfs_rmap_lookup_le(cur, bno, len, owner, offset, oldext, &i);
1158 error = xfs_btree_increment(cur, 0, &i);
1165 trace_xfs_rmap_delete(mp, cur->bc_ag.agno,
1169 error = xfs_btree_delete(cur, &i);
1176 error = xfs_btree_decrement(cur, 0, &i);
1183 trace_xfs_rmap_delete(mp, cur->bc_ag.agno,
1187 error = xfs_btree_delete(cur, &i);
1194 error = xfs_btree_decrement(cur, 0, &i);
1203 error = xfs_rmap_update(cur, &NEW);
1213 trace_xfs_rmap_delete(mp, cur->bc_ag.agno,
1217 error = xfs_btree_delete(cur, &i);
1224 error = xfs_btree_decrement(cur, 0, &i);
1233 error = xfs_rmap_update(cur, &NEW);
1243 error = xfs_btree_increment(cur, 0, &i);
1250 trace_xfs_rmap_delete(mp, cur->bc_ag.agno,
1254 error = xfs_btree_delete(cur, &i);
1261 error = xfs_btree_decrement(cur, 0, &i);
1271 error = xfs_rmap_update(cur, &NEW);
1284 error = xfs_rmap_update(cur, &NEW);
1298 error = xfs_rmap_update(cur, &NEW);
1301 error = xfs_btree_decrement(cur, 0, &i);
1306 error = xfs_rmap_update(cur, &NEW);
1320 error = xfs_rmap_update(cur, &NEW);
1328 cur->bc_rec.r = NEW;
1329 trace_xfs_rmap_insert(mp, cur->bc_ag.agno, bno,
1331 error = xfs_btree_insert(cur, &i);
1347 error = xfs_rmap_update(cur, &NEW);
1350 error = xfs_btree_increment(cur, 0, &i);
1357 error = xfs_rmap_update(cur, &NEW);
1369 error = xfs_rmap_update(cur, &NEW);
1372 error = xfs_rmap_lookup_eq(cur, bno, len, owner, offset,
1385 cur->bc_rec.r = NEW;
1386 trace_xfs_rmap_insert(mp, cur->bc_ag.agno, bno,
1388 error = xfs_btree_insert(cur, &i);
1410 error = xfs_rmap_update(cur, &NEW);
1416 cur->bc_rec.r = NEW;
1417 trace_xfs_rmap_insert(mp, cur->bc_ag.agno,
1421 error = xfs_btree_insert(cur, &i);
1433 error = xfs_rmap_lookup_eq(cur, bno, len, owner, offset,
1442 cur->bc_rec.r.rm_flags &= ~XFS_RMAP_UNWRITTEN;
1443 cur->bc_rec.r.rm_flags |= newext;
1444 trace_xfs_rmap_insert(mp, cur->bc_ag.agno, bno, len,
1446 error = xfs_btree_insert(cur, &i);
1468 trace_xfs_rmap_convert_done(mp, cur->bc_ag.agno, bno, len,
1472 trace_xfs_rmap_convert_error(cur->bc_mp,
1473 cur->bc_ag.agno, error, _RET_IP_);
1484 struct xfs_btree_cur *cur,
1490 struct xfs_mount *mp = cur->bc_mp;
1509 trace_xfs_rmap_convert(mp, cur->bc_ag.agno, bno, len,
1517 error = xfs_rmap_lookup_le_range(cur, bno, owner, offset, oldext,
1541 error = xfs_rmap_find_left_neighbor(cur, bno, owner, offset, newext,
1558 error = xfs_rmap_lookup_eq(cur, bno + len, len, owner, offset + len,
1564 error = xfs_rmap_get_rec(cur, &RIGHT, &i);
1575 trace_xfs_rmap_find_right_neighbor_result(cur->bc_mp,
1576 cur->bc_ag.agno, RIGHT.rm_startblock,
1592 trace_xfs_rmap_convert_state(mp, cur->bc_ag.agno, state,
1605 error = xfs_rmap_delete(cur, RIGHT.rm_startblock,
1610 error = xfs_rmap_delete(cur, PREV.rm_startblock,
1616 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock,
1626 error = xfs_rmap_update(cur, &NEW);
1636 error = xfs_rmap_delete(cur, PREV.rm_startblock,
1642 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock,
1652 error = xfs_rmap_update(cur, &NEW);
1662 error = xfs_rmap_delete(cur, RIGHT.rm_startblock,
1668 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock,
1679 error = xfs_rmap_update(cur, &NEW);
1691 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock,
1701 error = xfs_rmap_update(cur, &NEW);
1712 error = xfs_rmap_delete(cur, NEW.rm_startblock,
1720 error = xfs_rmap_insert(cur, NEW.rm_startblock,
1726 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock,
1736 error = xfs_rmap_update(cur, &NEW);
1747 error = xfs_rmap_delete(cur, NEW.rm_startblock,
1755 error = xfs_rmap_insert(cur, NEW.rm_startblock,
1760 error = xfs_rmap_insert(cur, bno, len, owner, offset, newext);
1771 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock,
1781 error = xfs_rmap_update(cur, &NEW);
1785 error = xfs_rmap_delete(cur, NEW.rm_startblock,
1793 error = xfs_rmap_insert(cur, NEW.rm_startblock,
1806 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock,
1816 error = xfs_rmap_update(cur, &NEW);
1819 error = xfs_rmap_insert(cur, bno, len, owner, offset, newext);
1837 error = xfs_rmap_insert(cur, NEW.rm_startblock,
1844 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock,
1854 error = xfs_rmap_update(cur, &NEW);
1863 error = xfs_rmap_insert(cur, NEW.rm_startblock,
1883 trace_xfs_rmap_convert_done(mp, cur->bc_ag.agno, bno, len,
1887 trace_xfs_rmap_convert_error(cur->bc_mp,
1888 cur->bc_ag.agno, error, _RET_IP_);
1908 struct xfs_btree_cur *cur,
1914 struct xfs_mount *mp = cur->bc_mp;
1926 trace_xfs_rmap_unmap(mp, cur->bc_ag.agno, bno, len,
1934 error = xfs_rmap_lookup_le_range(cur, bno, owner, offset, flags,
1979 error = xfs_rmap_delete(cur, ltrec.rm_startblock,
1997 error = xfs_rmap_delete(cur, ltrec.rm_startblock,
2007 error = xfs_rmap_insert(cur, ltrec.rm_startblock,
2023 error = xfs_rmap_lookup_eq(cur, ltrec.rm_startblock,
2033 error = xfs_rmap_update(cur, <rec);
2052 error = xfs_rmap_lookup_eq(cur, ltrec.rm_startblock,
2062 error = xfs_rmap_update(cur, <rec);
2067 error = xfs_rmap_insert(cur, bno + len,
2075 trace_xfs_rmap_unmap_done(mp, cur->bc_ag.agno, bno, len,
2079 trace_xfs_rmap_unmap_error(cur->bc_mp,
2080 cur->bc_ag.agno, error, _RET_IP_);
2095 struct xfs_btree_cur *cur,
2101 struct xfs_mount *mp = cur->bc_mp;
2115 trace_xfs_rmap_map(mp, cur->bc_ag.agno, bno, len,
2119 error = xfs_rmap_find_left_neighbor(cur, bno, owner, offset, flags,
2128 error = xfs_rmap_lookup_eq(cur, bno + len, len, owner, offset + len,
2133 error = xfs_rmap_get_rec(cur, >rec, &have_gt);
2140 trace_xfs_rmap_find_right_neighbor_result(cur->bc_mp,
2141 cur->bc_ag.agno, gtrec.rm_startblock,
2175 error = xfs_rmap_delete(cur, gtrec.rm_startblock,
2183 error = xfs_rmap_lookup_eq(cur, ltrec.rm_startblock,
2193 error = xfs_rmap_update(cur, <rec);
2209 error = xfs_rmap_delete(cur, gtrec.rm_startblock,
2219 error = xfs_rmap_insert(cur, gtrec.rm_startblock,
2229 error = xfs_rmap_insert(cur, bno, len, owner, offset, flags);
2234 trace_xfs_rmap_map_done(mp, cur->bc_ag.agno, bno, len,
2238 trace_xfs_rmap_map_error(cur->bc_mp,
2239 cur->bc_ag.agno, error, _RET_IP_);
2246 struct xfs_btree_cur *cur,
2260 return xfs_rmap_map(cur, rmap->rm_startblock,
2265 return xfs_rmap_map_shared(cur, rmap->rm_startblock,
2279 struct xfs_btree_cur *cur,
2290 return query->fn(cur, &irec, query->priv);
2296 struct xfs_btree_cur *cur,
2310 return xfs_btree_query_range(cur, &low_brec, &high_brec,
2317 struct xfs_btree_cur *cur,
2325 return xfs_btree_query_all(cur, xfs_rmap_query_range_helper, &query);
2638 struct xfs_btree_cur *cur,
2651 return xfs_btree_has_record(cur, &low, &high, exists);
2663 struct xfs_btree_cur *cur,
2680 error = xfs_rmap_lookup_le(cur, bno, len, owner, offset, flags,
2689 error = xfs_rmap_get_rec(cur, &irec, &has_record);
2711 struct xfs_btree_cur *cur,
2729 struct xfs_btree_cur *cur,
2747 error = xfs_rmap_query_range(cur, &low, &high,