Lines Matching defs:right

332  * which extent is to the left or the right of that extent.  Now we
333 * have a left, current, and right extent. If the new reference count
334 * of the center extent enables us to merge left, center, and right
338 * If the center extent is at the right end of the range, abuts the
339 * right extent, and the reference counts match, merge those. In the
415 /* Establish the right extent. */
442 * Merge the left, center, and right extents.
449 struct xfs_refcount_irec *right,
457 cur->bc_ag.pag->pag_agno, left, center, right);
460 ASSERT(right->rc_domain == center->rc_domain);
463 * Make sure the center and right extents are not in the btree.
465 * removes the right extent and we skip the second deletion.
466 * If center and right were in the btree, then the first delete
467 * call removes the center and the second one removes the right
586 * Merge with the right extent.
591 struct xfs_refcount_irec *right,
599 cur->bc_ag.pag->pag_agno, cright, right);
601 ASSERT(right->rc_domain == cright->rc_domain);
626 /* Enlarge the right extent. */
627 error = xfs_refcount_lookup_le(cur, right->rc_domain,
628 right->rc_startblock, &found_rec);
636 right->rc_startblock -= cright->rc_blockcount;
637 right->rc_blockcount += cright->rc_blockcount;
638 error = xfs_refcount_update(cur, right);
687 /* We have a left extent; retrieve (or invent) the next right one */
745 * Find the right extent and the one before it (cright). This function
751 struct xfs_refcount_irec *right,
761 right->rc_startblock = cright->rc_startblock = NULLAGBLOCK;
780 /* We have a right extent; retrieve (or invent) the next left one */
781 *right = tmp;
811 cright->rc_blockcount = right->rc_startblock -
828 cright, right, agbno + aglen);
861 const struct xfs_refcount_irec *right,
874 if (!xfs_refc_valid(left) || !xfs_refc_valid(right) ||
886 if (right->rc_refcount != new_refcount)
894 ulen += cleft->rc_blockcount + right->rc_blockcount;
939 const struct xfs_refcount_irec *right,
942 unsigned long long ulen = right->rc_blockcount;
946 * For a right merge, the right shoulder record must be adjacent to the
947 * end of the range. If this is true, find_right made cright and right
950 if (!xfs_refc_valid(right) || !xfs_refc_valid(cright))
955 if (right->rc_refcount != new_refcount)
983 struct xfs_refcount_irec cright = {0}, right = {0};
992 * [right].
998 error = xfs_refcount_find_right_extents(cur, &right, &cright, domain,
1003 /* No left or right extent to merge; exit. */
1004 if (!xfs_refc_valid(&left) && !xfs_refc_valid(&right))
1010 /* Try to merge left, cleft, and right. cleft must == cright. */
1011 if (xfs_refc_want_merge_center(&left, &cleft, &cright, &right, cequal,
1015 &right, ulen, aglen);
1028 * we no longer have a cright to merge with right. We're done.
1034 /* Try to merge cright and right. */
1035 if (xfs_refc_want_merge_right(&cright, &right, adjust)) {
1037 return xfs_refcount_merge_right_extent(cur, &right, &cright,
1277 * Try to merge with the left or right extents of the range.
1787 * Try to merge with the left or right extents of the range.