Lines Matching refs:agbno
35 xfs_agblock_t agbno, xfs_extlen_t aglen);
37 xfs_agblock_t agbno, xfs_extlen_t aglen);
339 * Split a refcount extent that crosses agbno.
344 xfs_agblock_t agbno,
352 error = xfs_refcount_lookup_le(cur, agbno, &found_rec);
365 if (rcext.rc_startblock == agbno || xfs_refc_next(&rcext) <= agbno)
370 &rcext, agbno);
374 tmp.rc_startblock = agbno;
375 tmp.rc_blockcount -= (agbno - rcext.rc_startblock);
382 tmp.rc_blockcount = agbno - rcext.rc_startblock;
483 xfs_agblock_t *agbno,
492 /* If the extent at agbno (cleft) wasn't synthesized, remove it. */
527 *agbno += cleft->rc_blockcount;
554 * If the extent ending at agbno+aglen (cright) wasn't synthesized,
605 * that we've already split any extent crossing agbno.
612 xfs_agblock_t agbno,
621 error = xfs_refcount_lookup_le(cur, agbno - 1, &found_rec);
635 if (xfs_refc_next(&tmp) != agbno)
657 if (tmp.rc_startblock == agbno)
664 * We assume here that the agbno/aglen range was
668 cleft->rc_startblock = agbno;
670 tmp.rc_startblock - agbno);
678 cleft->rc_startblock = agbno;
683 left, cleft, agbno);
694 * assumes that we've already split any extents crossing agbno + aglen.
701 xfs_agblock_t agbno,
710 error = xfs_refcount_lookup_ge(cur, agbno + aglen, &found_rec);
724 if (tmp.rc_startblock != agbno + aglen)
746 if (xfs_refc_next(&tmp) == agbno + aglen)
753 * We assume here that the agbno/aglen range was
757 cright->rc_startblock = max(agbno, xfs_refc_next(&tmp));
767 cright->rc_startblock = agbno;
772 cright, right, agbno + aglen);
795 xfs_agblock_t *agbno,
809 * Find the extent just below agbno [left], just above agbno [cleft],
810 * just below (agbno + aglen) [cright], and just above (agbno + aglen)
813 error = xfs_refcount_find_left_extents(cur, &left, &cleft, *agbno,
817 error = xfs_refcount_find_right_extents(cur, &right, &cright, *agbno,
849 agbno, aglen);
910 * extents; and updated agbno/aglen to reflect the merges. Therefore,
911 * all we have to do is update the extents inside [agbno, agbno + aglen].
916 xfs_agblock_t *agbno,
930 error = xfs_refcount_lookup_ge(cur, *agbno, &found_rec);
949 if (ext.rc_startblock != *agbno) {
950 tmp.rc_startblock = *agbno;
952 ext.rc_startblock - *agbno);
980 (*agbno) += tmp.rc_blockcount;
983 error = xfs_refcount_lookup_ge(cur, *agbno,
1031 (*agbno) += ext.rc_blockcount;
1046 xfs_agblock_t agbno,
1057 *new_agbno = agbno;
1061 agbno, aglen);
1064 agbno, aglen);
1069 error = xfs_refcount_split_extent(cur, agbno, &shape_changed);
1075 error = xfs_refcount_split_extent(cur, agbno + aglen, &shape_changed);
1295 xfs_agblock_t agbno,
1307 agbno, aglen);
1314 error = xfs_refcount_lookup_le(cur, agbno, &have);
1334 if (tmp.rc_startblock + tmp.rc_blockcount <= agbno) {
1350 if (tmp.rc_startblock >= agbno + aglen)
1354 if (tmp.rc_startblock < agbno) {
1355 tmp.rc_blockcount -= (agbno - tmp.rc_startblock);
1356 tmp.rc_startblock = agbno;
1360 *flen = min(tmp.rc_blockcount, agbno + aglen - *fbno);
1365 while (*fbno + *flen < agbno + aglen) {
1378 if (tmp.rc_startblock >= agbno + aglen ||
1381 *flen = min(*flen + tmp.rc_blockcount, agbno + aglen - *fbno);
1450 xfs_agblock_t agbno,
1462 error = xfs_refcount_lookup_ge(cur, agbno, &found_rec);
1479 agbno + aglen > ext.rc_startblock)) {
1484 tmp.rc_startblock = agbno;
1501 if (XFS_IS_CORRUPT(cur->bc_mp, ext.rc_startblock != agbno)) {
1542 xfs_agblock_t agbno,
1549 agbno += XFS_REFC_COW_START;
1554 error = xfs_refcount_split_extent(cur, agbno, &shape_changed);
1558 error = xfs_refcount_split_extent(cur, agbno + aglen, &shape_changed);
1565 error = xfs_refcount_merge_extents(cur, &agbno, &aglen, adj,
1571 error = xfs_refcount_adjust_cow_extents(cur, agbno, aglen, adj);
1589 xfs_agblock_t agbno,
1593 agbno, aglen);
1596 return xfs_refcount_adjust_cow(rcur, agbno, aglen,
1606 xfs_agblock_t agbno,
1610 agbno, aglen);
1613 return xfs_refcount_adjust_cow(rcur, agbno, aglen,
1694 xfs_agblock_t agbno;
1744 agbno = rr->rr_rrec.rc_startblock - XFS_REFC_COW_START;
1745 fsb = XFS_AGB_TO_FSB(mp, agno, agbno);