Lines Matching refs:left
292 * which extent is to the left or the right of that extent. Now we
293 * have a left, current, and right extent. If the new reference count
294 * of the center extent enables us to merge left, center, and right
296 * at the left end of the range, abuts the left extent, and its new
297 * reference count matches the left extent's record, then merge them.
300 * example, we can left merge (assuming an increment operation):
380 /* Insert the left extent. */
399 * Merge the left, center, and right extents.
404 struct xfs_refcount_irec *left,
414 cur->bc_ag.agno, left, center, right);
451 /* Enlarge the left extent. */
452 error = xfs_refcount_lookup_le(cur, left->rc_startblock,
461 left->rc_blockcount = extlen;
462 error = xfs_refcount_update(cur, left);
476 * Merge with the left extent.
481 struct xfs_refcount_irec *left,
490 cur->bc_ag.agno, left, cleft);
512 /* Enlarge the left extent. */
513 error = xfs_refcount_lookup_le(cur, left->rc_startblock,
522 left->rc_blockcount += cleft->rc_blockcount;
523 error = xfs_refcount_update(cur, left);
604 * Find the left extent and the one after it (cleft). This function assumes
610 struct xfs_refcount_irec *left,
620 left->rc_startblock = cleft->rc_startblock = NULLAGBLOCK;
641 /* We have a left extent; retrieve (or invent) the next right one */
642 *left = tmp;
683 left, cleft, agbno);
730 /* We have a right extent; retrieve (or invent) the next left one */
801 struct xfs_refcount_irec left = {0}, cleft = {0};
809 * Find the extent just below agbno [left], just above agbno [cleft],
813 error = xfs_refcount_find_left_extents(cur, &left, &cleft, *agbno,
822 /* No left or right extent to merge; exit. */
823 if (!xfs_refc_valid(&left) && !xfs_refc_valid(&right))
829 /* Try to merge left, cleft, and right. cleft must == cright. */
830 ulen = (unsigned long long)left.rc_blockcount + cleft.rc_blockcount +
832 if (xfs_refc_valid(&left) && xfs_refc_valid(&right) &&
834 left.rc_refcount == cleft.rc_refcount + adjust &&
838 return xfs_refcount_merge_center_extents(cur, &left, &cleft,
842 /* Try to merge left and cleft. */
843 ulen = (unsigned long long)left.rc_blockcount + cleft.rc_blockcount;
844 if (xfs_refc_valid(&left) && xfs_refc_valid(&cleft) &&
845 left.rc_refcount == cleft.rc_refcount + adjust &&
848 error = xfs_refcount_merge_left_extent(cur, &left, &cleft,
854 * If we just merged left + cleft and cleft == cright,
989 /* Stop if there's nothing left to modify */
1082 * Try to merge with the left or right extents of the range.
1318 /* No left extent, look at the next one */
1563 * Try to merge with the left or right extents of the range.