Lines Matching refs:agbno
38 xfs_agblock_t agbno, xfs_extlen_t aglen);
40 xfs_agblock_t agbno, xfs_extlen_t aglen);
363 xfs_agblock_t agbno, in xfs_refcount_split_extent() argument
371 error = xfs_refcount_lookup_le(cur, domain, agbno, &found_rec); in xfs_refcount_split_extent()
386 if (rcext.rc_startblock == agbno || xfs_refc_next(&rcext) <= agbno) in xfs_refcount_split_extent()
391 &rcext, agbno); in xfs_refcount_split_extent()
395 tmp.rc_startblock = agbno; in xfs_refcount_split_extent()
396 tmp.rc_blockcount -= (agbno - rcext.rc_startblock); in xfs_refcount_split_extent()
403 tmp.rc_blockcount = agbno - rcext.rc_startblock; in xfs_refcount_split_extent()
507 xfs_agblock_t *agbno, in xfs_refcount_merge_left_extent() argument
553 *agbno += cleft->rc_blockcount; in xfs_refcount_merge_left_extent()
639 xfs_agblock_t agbno, in xfs_refcount_find_left_extents() argument
647 error = xfs_refcount_lookup_le(cur, domain, agbno - 1, &found_rec); in xfs_refcount_find_left_extents()
663 if (xfs_refc_next(&tmp) != agbno) in xfs_refcount_find_left_extents()
684 if (tmp.rc_startblock == agbno) in xfs_refcount_find_left_extents()
695 cleft->rc_startblock = agbno; in xfs_refcount_find_left_extents()
697 tmp.rc_startblock - agbno); in xfs_refcount_find_left_extents()
707 cleft->rc_startblock = agbno; in xfs_refcount_find_left_extents()
713 left, cleft, agbno); in xfs_refcount_find_left_extents()
732 xfs_agblock_t agbno, in xfs_refcount_find_right_extents() argument
740 error = xfs_refcount_lookup_ge(cur, domain, agbno + aglen, &found_rec); in xfs_refcount_find_right_extents()
756 if (tmp.rc_startblock != agbno + aglen) in xfs_refcount_find_right_extents()
777 if (xfs_refc_next(&tmp) == agbno + aglen) in xfs_refcount_find_right_extents()
788 cright->rc_startblock = max(agbno, xfs_refc_next(&tmp)); in xfs_refcount_find_right_extents()
800 cright->rc_startblock = agbno; in xfs_refcount_find_right_extents()
806 cright, right, agbno + aglen); in xfs_refcount_find_right_extents()
830 xfs_agblock_t *agbno, in xfs_refcount_merge_extents() argument
848 *agbno, *aglen); in xfs_refcount_merge_extents()
852 *agbno, *aglen); in xfs_refcount_merge_extents()
883 agbno, aglen); in xfs_refcount_merge_extents()
955 xfs_agblock_t *agbno, in xfs_refcount_adjust_extents() argument
968 error = xfs_refcount_lookup_ge(cur, XFS_REFC_DOMAIN_SHARED, *agbno, in xfs_refcount_adjust_extents()
989 if (ext.rc_startblock != *agbno) { in xfs_refcount_adjust_extents()
990 tmp.rc_startblock = *agbno; in xfs_refcount_adjust_extents()
992 ext.rc_startblock - *agbno); in xfs_refcount_adjust_extents()
1022 (*agbno) += tmp.rc_blockcount; in xfs_refcount_adjust_extents()
1031 XFS_REFC_DOMAIN_SHARED, *agbno, in xfs_refcount_adjust_extents()
1087 (*agbno) += ext.rc_blockcount; in xfs_refcount_adjust_extents()
1102 xfs_agblock_t agbno, in xfs_refcount_adjust() argument
1112 *new_agbno = agbno; in xfs_refcount_adjust()
1116 agbno, aglen); in xfs_refcount_adjust()
1119 agbno, aglen); in xfs_refcount_adjust()
1125 agbno, &shape_changed); in xfs_refcount_adjust()
1132 agbno + aglen, &shape_changed); in xfs_refcount_adjust()
1378 xfs_agblock_t agbno, in xfs_refcount_find_shared() argument
1390 agbno, aglen); in xfs_refcount_find_shared()
1397 error = xfs_refcount_lookup_le(cur, XFS_REFC_DOMAIN_SHARED, agbno, in xfs_refcount_find_shared()
1420 if (tmp.rc_startblock + tmp.rc_blockcount <= agbno) { in xfs_refcount_find_shared()
1438 if (tmp.rc_startblock >= agbno + aglen) in xfs_refcount_find_shared()
1442 if (tmp.rc_startblock < agbno) { in xfs_refcount_find_shared()
1443 tmp.rc_blockcount -= (agbno - tmp.rc_startblock); in xfs_refcount_find_shared()
1444 tmp.rc_startblock = agbno; in xfs_refcount_find_shared()
1448 *flen = min(tmp.rc_blockcount, agbno + aglen - *fbno); in xfs_refcount_find_shared()
1453 while (*fbno + *flen < agbno + aglen) { in xfs_refcount_find_shared()
1467 tmp.rc_startblock >= agbno + aglen || in xfs_refcount_find_shared()
1470 *flen = min(*flen + tmp.rc_blockcount, agbno + aglen - *fbno); in xfs_refcount_find_shared()
1539 xfs_agblock_t agbno, in xfs_refcount_adjust_cow_extents() argument
1551 error = xfs_refcount_lookup_ge(cur, XFS_REFC_DOMAIN_COW, agbno, in xfs_refcount_adjust_cow_extents()
1574 agbno + aglen > ext.rc_startblock)) { in xfs_refcount_adjust_cow_extents()
1579 tmp.rc_startblock = agbno; in xfs_refcount_adjust_cow_extents()
1598 if (XFS_IS_CORRUPT(cur->bc_mp, ext.rc_startblock != agbno)) { in xfs_refcount_adjust_cow_extents()
1639 xfs_agblock_t agbno, in xfs_refcount_adjust_cow() argument
1650 agbno, &shape_changed); in xfs_refcount_adjust_cow()
1655 agbno + aglen, &shape_changed); in xfs_refcount_adjust_cow()
1662 error = xfs_refcount_merge_extents(cur, XFS_REFC_DOMAIN_COW, &agbno, in xfs_refcount_adjust_cow()
1668 error = xfs_refcount_adjust_cow_extents(cur, agbno, aglen, adj); in xfs_refcount_adjust_cow()
1686 xfs_agblock_t agbno, in __xfs_refcount_cow_alloc() argument
1690 agbno, aglen); in __xfs_refcount_cow_alloc()
1693 return xfs_refcount_adjust_cow(rcur, agbno, aglen, in __xfs_refcount_cow_alloc()
1703 xfs_agblock_t agbno, in __xfs_refcount_cow_free() argument
1707 agbno, aglen); in __xfs_refcount_cow_free()
1710 return xfs_refcount_adjust_cow(rcur, agbno, aglen, in __xfs_refcount_cow_free()