Lines Matching refs:bno
36 xfs_agblock_t bno, in xfs_rmap_lookup_le() argument
43 cur->bc_rec.r.rm_startblock = bno; in xfs_rmap_lookup_le()
58 xfs_agblock_t bno, in xfs_rmap_lookup_eq() argument
65 cur->bc_rec.r.rm_startblock = bno; in xfs_rmap_lookup_eq()
291 xfs_agblock_t bno, in xfs_rmap_find_left_neighbor() argument
302 if (bno == 0) in xfs_rmap_find_left_neighbor()
304 info.high.rm_startblock = bno - 1; in xfs_rmap_find_left_neighbor()
319 cur->bc_ag.pag->pag_agno, bno, 0, owner, offset, flags); in xfs_rmap_find_left_neighbor()
369 xfs_agblock_t bno, in xfs_rmap_lookup_le_range() argument
379 info.high.rm_startblock = bno; in xfs_rmap_lookup_le_range()
392 cur->bc_ag.pag->pag_agno, bno, 0, owner, offset, flags); in xfs_rmap_lookup_le_range()
485 xfs_agblock_t bno, in xfs_rmap_unmap() argument
505 trace_xfs_rmap_unmap(mp, cur->bc_ag.pag->pag_agno, bno, len, in xfs_rmap_unmap()
513 error = xfs_rmap_lookup_le(cur, bno, len, owner, offset, flags, &i); in xfs_rmap_unmap()
543 bno < in xfs_rmap_unmap()
559 ltrec.rm_startblock + ltrec.rm_blockcount <= bno) { in xfs_rmap_unmap()
574 if (rtrec.rm_startblock >= bno + len) in xfs_rmap_unmap()
580 ltrec.rm_startblock > bno || in xfs_rmap_unmap()
582 bno + len)) { in xfs_rmap_unmap()
593 if (ltrec.rm_startblock == bno && ltrec.rm_blockcount == len) { in xfs_rmap_unmap()
606 } else if (ltrec.rm_startblock == bno) { in xfs_rmap_unmap()
624 } else if (ltrec.rm_startblock + ltrec.rm_blockcount == bno + len) { in xfs_rmap_unmap()
655 ltrec.rm_blockcount = bno - ltrec.rm_startblock; in xfs_rmap_unmap()
664 cur->bc_rec.r.rm_startblock = bno + len; in xfs_rmap_unmap()
685 trace_xfs_rmap_unmap_done(mp, cur->bc_ag.pag->pag_agno, bno, len, in xfs_rmap_unmap()
702 xfs_agblock_t bno, in xfs_rmap_free() argument
715 error = xfs_rmap_unmap(cur, bno, len, false, oinfo); in xfs_rmap_free()
757 xfs_agblock_t bno, in xfs_rmap_map() argument
780 trace_xfs_rmap_map(mp, cur->bc_ag.pag->pag_agno, bno, len, in xfs_rmap_map()
789 error = xfs_rmap_lookup_le(cur, bno, len, owner, offset, flags, in xfs_rmap_map()
812 ltrec.rm_startblock + ltrec.rm_blockcount > bno)) { in xfs_rmap_map()
833 if (XFS_IS_CORRUPT(mp, bno + len > gtrec.rm_startblock)) { in xfs_rmap_map()
850 ltrec.rm_startblock + ltrec.rm_blockcount == bno && in xfs_rmap_map()
863 bno + len == gtrec.rm_startblock && in xfs_rmap_map()
900 bno + len == gtrec.rm_startblock && in xfs_rmap_map()
911 gtrec.rm_startblock = bno; in xfs_rmap_map()
923 cur->bc_rec.r.rm_startblock = bno; in xfs_rmap_map()
928 trace_xfs_rmap_insert(mp, cur->bc_ag.pag->pag_agno, bno, len, in xfs_rmap_map()
939 trace_xfs_rmap_map_done(mp, cur->bc_ag.pag->pag_agno, bno, len, in xfs_rmap_map()
956 xfs_agblock_t bno, in xfs_rmap_alloc() argument
968 error = xfs_rmap_map(cur, bno, len, false, oinfo); in xfs_rmap_alloc()
993 xfs_agblock_t bno, in xfs_rmap_convert() argument
1017 trace_xfs_rmap_convert(mp, cur->bc_ag.pag->pag_agno, bno, len, in xfs_rmap_convert()
1025 error = xfs_rmap_lookup_le(cur, bno, len, owner, offset, oldext, &i); in xfs_rmap_convert()
1078 bno)) { in xfs_rmap_convert()
1086 if (LEFT.rm_startblock + LEFT.rm_blockcount == bno && in xfs_rmap_convert()
1116 if (XFS_IS_CORRUPT(mp, bno + len > RIGHT.rm_startblock)) { in xfs_rmap_convert()
1124 if (bno + len == RIGHT.rm_startblock && in xfs_rmap_convert()
1143 error = xfs_rmap_lookup_le(cur, bno, len, owner, offset, oldext, &i); in xfs_rmap_convert()
1327 NEW.rm_startblock = bno; in xfs_rmap_convert()
1333 trace_xfs_rmap_insert(mp, cur->bc_ag.pag->pag_agno, bno, in xfs_rmap_convert()
1359 NEW.rm_startblock = bno; in xfs_rmap_convert()
1376 error = xfs_rmap_lookup_eq(cur, bno, len, owner, offset, in xfs_rmap_convert()
1384 NEW.rm_startblock = bno; in xfs_rmap_convert()
1390 trace_xfs_rmap_insert(mp, cur->bc_ag.pag->pag_agno, bno, in xfs_rmap_convert()
1408 NEW.rm_startblock = bno + len; in xfs_rmap_convert()
1437 error = xfs_rmap_lookup_eq(cur, bno, len, owner, offset, in xfs_rmap_convert()
1448 trace_xfs_rmap_insert(mp, cur->bc_ag.pag->pag_agno, bno, len, in xfs_rmap_convert()
1472 trace_xfs_rmap_convert_done(mp, cur->bc_ag.pag->pag_agno, bno, len, in xfs_rmap_convert()
1489 xfs_agblock_t bno, in xfs_rmap_convert_shared() argument
1513 trace_xfs_rmap_convert(mp, cur->bc_ag.pag->pag_agno, bno, len, in xfs_rmap_convert_shared()
1521 error = xfs_rmap_lookup_le_range(cur, bno, owner, offset, oldext, in xfs_rmap_convert_shared()
1545 error = xfs_rmap_find_left_neighbor(cur, bno, owner, offset, newext, in xfs_rmap_convert_shared()
1553 bno)) { in xfs_rmap_convert_shared()
1562 error = xfs_rmap_lookup_eq(cur, bno + len, len, owner, offset + len, in xfs_rmap_convert_shared()
1575 if (XFS_IS_CORRUPT(mp, bno + len > RIGHT.rm_startblock)) { in xfs_rmap_convert_shared()
1764 error = xfs_rmap_insert(cur, bno, len, owner, offset, newext); in xfs_rmap_convert_shared()
1795 NEW.rm_startblock = bno; in xfs_rmap_convert_shared()
1823 error = xfs_rmap_insert(cur, bno, len, owner, offset, newext); in xfs_rmap_convert_shared()
1835 NEW.rm_startblock = bno + len; in xfs_rmap_convert_shared()
1862 NEW.rm_startblock = bno; in xfs_rmap_convert_shared()
1887 trace_xfs_rmap_convert_done(mp, cur->bc_ag.pag->pag_agno, bno, len, in xfs_rmap_convert_shared()
1913 xfs_agblock_t bno, in xfs_rmap_unmap_shared() argument
1930 trace_xfs_rmap_unmap(mp, cur->bc_ag.pag->pag_agno, bno, len, in xfs_rmap_unmap_shared()
1938 error = xfs_rmap_lookup_le_range(cur, bno, owner, offset, flags, in xfs_rmap_unmap_shared()
1950 ltrec.rm_startblock > bno || in xfs_rmap_unmap_shared()
1952 bno + len)) { in xfs_rmap_unmap_shared()
1981 if (ltrec.rm_startblock == bno && ltrec.rm_blockcount == len) { in xfs_rmap_unmap_shared()
1988 } else if (ltrec.rm_startblock == bno) { in xfs_rmap_unmap_shared()
2016 } else if (ltrec.rm_startblock + ltrec.rm_blockcount == bno + len) { in xfs_rmap_unmap_shared()
2065 ltrec.rm_blockcount = bno - ltrec.rm_startblock; in xfs_rmap_unmap_shared()
2071 error = xfs_rmap_insert(cur, bno + len, in xfs_rmap_unmap_shared()
2079 trace_xfs_rmap_unmap_done(mp, cur->bc_ag.pag->pag_agno, bno, len, in xfs_rmap_unmap_shared()
2100 xfs_agblock_t bno, in xfs_rmap_map_shared() argument
2119 trace_xfs_rmap_map(mp, cur->bc_ag.pag->pag_agno, bno, len, in xfs_rmap_map_shared()
2123 error = xfs_rmap_find_left_neighbor(cur, bno, owner, offset, flags, in xfs_rmap_map_shared()
2132 error = xfs_rmap_lookup_eq(cur, bno + len, len, owner, offset + len, in xfs_rmap_map_shared()
2154 ltrec.rm_startblock + ltrec.rm_blockcount == bno && in xfs_rmap_map_shared()
2167 bno + len == gtrec.rm_startblock && in xfs_rmap_map_shared()
2201 bno + len == gtrec.rm_startblock && in xfs_rmap_map_shared()
2220 gtrec.rm_startblock = bno; in xfs_rmap_map_shared()
2233 error = xfs_rmap_insert(cur, bno, len, owner, offset, flags); in xfs_rmap_map_shared()
2238 trace_xfs_rmap_map_done(mp, cur->bc_ag.pag->pag_agno, bno, len, in xfs_rmap_map_shared()
2374 xfs_agblock_t bno; in xfs_rmap_finish_one() local
2378 bno = XFS_FSB_TO_AGBNO(mp, startblock); in xfs_rmap_finish_one()
2380 trace_xfs_rmap_deferred(mp, pag->pag_agno, type, bno, owner, whichfork, in xfs_rmap_finish_one()
2419 bno = XFS_FSB_TO_AGBNO(rcur->bc_mp, startblock); in xfs_rmap_finish_one()
2424 error = xfs_rmap_map(rcur, bno, blockcount, unwritten, &oinfo); in xfs_rmap_finish_one()
2427 error = xfs_rmap_map_shared(rcur, bno, blockcount, unwritten, in xfs_rmap_finish_one()
2432 error = xfs_rmap_unmap(rcur, bno, blockcount, unwritten, in xfs_rmap_finish_one()
2436 error = xfs_rmap_unmap_shared(rcur, bno, blockcount, unwritten, in xfs_rmap_finish_one()
2440 error = xfs_rmap_convert(rcur, bno, blockcount, !unwritten, in xfs_rmap_finish_one()
2444 error = xfs_rmap_convert_shared(rcur, bno, blockcount, in xfs_rmap_finish_one()
2568 xfs_agblock_t bno, in xfs_rmap_alloc_extent() argument
2577 bmap.br_startblock = XFS_AGB_TO_FSB(tp->t_mountp, agno, bno); in xfs_rmap_alloc_extent()
2590 xfs_agblock_t bno, in xfs_rmap_free_extent() argument
2599 bmap.br_startblock = XFS_AGB_TO_FSB(tp->t_mountp, agno, bno); in xfs_rmap_free_extent()
2639 xfs_agblock_t bno, in xfs_rmap_has_record() argument
2647 low.r.rm_startblock = bno; in xfs_rmap_has_record()
2649 high.r.rm_startblock = bno + len - 1; in xfs_rmap_has_record()
2664 xfs_agblock_t bno, in xfs_rmap_record_exists() argument
2680 error = xfs_rmap_lookup_le(cur, bno, len, owner, offset, flags, in xfs_rmap_record_exists()
2697 *has_rmap = (irec.rm_owner == owner && irec.rm_startblock <= bno && in xfs_rmap_record_exists()
2698 irec.rm_startblock + irec.rm_blockcount >= bno + len); in xfs_rmap_record_exists()
2730 xfs_agblock_t bno, in xfs_rmap_has_other_keys() argument
2743 low.rm_startblock = bno; in xfs_rmap_has_other_keys()
2745 high.rm_startblock = bno + len - 1; in xfs_rmap_has_other_keys()