Lines Matching refs:agbno
36 xfs_agblock_t agbno, xfs_extlen_t aglen);
38 xfs_agblock_t agbno, xfs_extlen_t aglen);
345 xfs_agblock_t agbno, in xfs_refcount_split_extent() argument
353 error = xfs_refcount_lookup_le(cur, agbno, &found_rec); in xfs_refcount_split_extent()
366 if (rcext.rc_startblock == agbno || xfs_refc_next(&rcext) <= agbno) in xfs_refcount_split_extent()
371 &rcext, agbno); in xfs_refcount_split_extent()
375 tmp.rc_startblock = agbno; in xfs_refcount_split_extent()
376 tmp.rc_blockcount -= (agbno - rcext.rc_startblock); in xfs_refcount_split_extent()
383 tmp.rc_blockcount = agbno - rcext.rc_startblock; in xfs_refcount_split_extent()
484 xfs_agblock_t *agbno, in xfs_refcount_merge_left_extent() argument
528 *agbno += cleft->rc_blockcount; in xfs_refcount_merge_left_extent()
613 xfs_agblock_t agbno, in xfs_refcount_find_left_extents() argument
622 error = xfs_refcount_lookup_le(cur, agbno - 1, &found_rec); in xfs_refcount_find_left_extents()
636 if (xfs_refc_next(&tmp) != agbno) in xfs_refcount_find_left_extents()
658 if (tmp.rc_startblock == agbno) in xfs_refcount_find_left_extents()
669 cleft->rc_startblock = agbno; in xfs_refcount_find_left_extents()
671 tmp.rc_startblock - agbno); in xfs_refcount_find_left_extents()
679 cleft->rc_startblock = agbno; in xfs_refcount_find_left_extents()
684 left, cleft, agbno); in xfs_refcount_find_left_extents()
702 xfs_agblock_t agbno, in xfs_refcount_find_right_extents() argument
711 error = xfs_refcount_lookup_ge(cur, agbno + aglen, &found_rec); in xfs_refcount_find_right_extents()
725 if (tmp.rc_startblock != agbno + aglen) in xfs_refcount_find_right_extents()
747 if (xfs_refc_next(&tmp) == agbno + aglen) in xfs_refcount_find_right_extents()
758 cright->rc_startblock = max(agbno, xfs_refc_next(&tmp)); in xfs_refcount_find_right_extents()
768 cright->rc_startblock = agbno; in xfs_refcount_find_right_extents()
773 cright, right, agbno + aglen); in xfs_refcount_find_right_extents()
796 xfs_agblock_t *agbno, in xfs_refcount_merge_extents() argument
814 error = xfs_refcount_find_left_extents(cur, &left, &cleft, *agbno, in xfs_refcount_merge_extents()
818 error = xfs_refcount_find_right_extents(cur, &right, &cright, *agbno, in xfs_refcount_merge_extents()
850 agbno, aglen); in xfs_refcount_merge_extents()
917 xfs_agblock_t *agbno, in xfs_refcount_adjust_extents() argument
931 error = xfs_refcount_lookup_ge(cur, *agbno, &found_rec); in xfs_refcount_adjust_extents()
950 if (ext.rc_startblock != *agbno) { in xfs_refcount_adjust_extents()
951 tmp.rc_startblock = *agbno; in xfs_refcount_adjust_extents()
953 ext.rc_startblock - *agbno); in xfs_refcount_adjust_extents()
981 (*agbno) += tmp.rc_blockcount; in xfs_refcount_adjust_extents()
984 error = xfs_refcount_lookup_ge(cur, *agbno, in xfs_refcount_adjust_extents()
1032 (*agbno) += ext.rc_blockcount; in xfs_refcount_adjust_extents()
1047 xfs_agblock_t agbno, in xfs_refcount_adjust() argument
1058 *new_agbno = agbno; in xfs_refcount_adjust()
1062 agbno, aglen); in xfs_refcount_adjust()
1065 agbno, aglen); in xfs_refcount_adjust()
1070 error = xfs_refcount_split_extent(cur, agbno, &shape_changed); in xfs_refcount_adjust()
1076 error = xfs_refcount_split_extent(cur, agbno + aglen, &shape_changed); in xfs_refcount_adjust()
1289 xfs_agblock_t agbno, in xfs_refcount_find_shared() argument
1301 agbno, aglen); in xfs_refcount_find_shared()
1308 error = xfs_refcount_lookup_le(cur, agbno, &have); in xfs_refcount_find_shared()
1328 if (tmp.rc_startblock + tmp.rc_blockcount <= agbno) { in xfs_refcount_find_shared()
1344 if (tmp.rc_startblock >= agbno + aglen) in xfs_refcount_find_shared()
1348 if (tmp.rc_startblock < agbno) { in xfs_refcount_find_shared()
1349 tmp.rc_blockcount -= (agbno - tmp.rc_startblock); in xfs_refcount_find_shared()
1350 tmp.rc_startblock = agbno; in xfs_refcount_find_shared()
1354 *flen = min(tmp.rc_blockcount, agbno + aglen - *fbno); in xfs_refcount_find_shared()
1359 while (*fbno + *flen < agbno + aglen) { in xfs_refcount_find_shared()
1372 if (tmp.rc_startblock >= agbno + aglen || in xfs_refcount_find_shared()
1375 *flen = min(*flen + tmp.rc_blockcount, agbno + aglen - *fbno); in xfs_refcount_find_shared()
1444 xfs_agblock_t agbno, in xfs_refcount_adjust_cow_extents() argument
1456 error = xfs_refcount_lookup_ge(cur, agbno, &found_rec); in xfs_refcount_adjust_cow_extents()
1473 agbno + aglen > ext.rc_startblock)) { in xfs_refcount_adjust_cow_extents()
1478 tmp.rc_startblock = agbno; in xfs_refcount_adjust_cow_extents()
1495 if (XFS_IS_CORRUPT(cur->bc_mp, ext.rc_startblock != agbno)) { in xfs_refcount_adjust_cow_extents()
1536 xfs_agblock_t agbno, in xfs_refcount_adjust_cow() argument
1543 agbno += XFS_REFC_COW_START; in xfs_refcount_adjust_cow()
1548 error = xfs_refcount_split_extent(cur, agbno, &shape_changed); in xfs_refcount_adjust_cow()
1552 error = xfs_refcount_split_extent(cur, agbno + aglen, &shape_changed); in xfs_refcount_adjust_cow()
1559 error = xfs_refcount_merge_extents(cur, &agbno, &aglen, adj, in xfs_refcount_adjust_cow()
1565 error = xfs_refcount_adjust_cow_extents(cur, agbno, aglen, adj); in xfs_refcount_adjust_cow()
1583 xfs_agblock_t agbno, in __xfs_refcount_cow_alloc() argument
1587 agbno, aglen); in __xfs_refcount_cow_alloc()
1590 return xfs_refcount_adjust_cow(rcur, agbno, aglen, in __xfs_refcount_cow_alloc()
1600 xfs_agblock_t agbno, in __xfs_refcount_cow_free() argument
1604 agbno, aglen); in __xfs_refcount_cow_free()
1607 return xfs_refcount_adjust_cow(rcur, agbno, aglen, in __xfs_refcount_cow_free()
1688 xfs_agblock_t agbno; in xfs_refcount_recover_cow_leftovers() local
1739 agbno = rr->rr_rrec.rc_startblock - XFS_REFC_COW_START; in xfs_refcount_recover_cow_leftovers()
1740 fsb = XFS_AGB_TO_FSB(mp, pag->pag_agno, agbno); in xfs_refcount_recover_cow_leftovers()