Lines Matching refs:rlen

405 	xfs_extlen_t	rlen;  in xfs_alloc_fix_len()  local
408 rlen = args->len; in xfs_alloc_fix_len()
409 ASSERT(rlen >= args->minlen); in xfs_alloc_fix_len()
410 ASSERT(rlen <= args->maxlen); in xfs_alloc_fix_len()
411 if (args->prod <= 1 || rlen < args->mod || rlen == args->maxlen || in xfs_alloc_fix_len()
412 (args->mod == 0 && rlen < args->prod)) in xfs_alloc_fix_len()
414 k = rlen % args->prod; in xfs_alloc_fix_len()
418 rlen = rlen - (k - args->mod); in xfs_alloc_fix_len()
420 rlen = rlen - args->prod + (args->mod - k); in xfs_alloc_fix_len()
422 if ((int)rlen < (int)args->minlen) in xfs_alloc_fix_len()
424 ASSERT(rlen >= args->minlen && rlen <= args->maxlen); in xfs_alloc_fix_len()
425 ASSERT(rlen % args->prod == args->mod); in xfs_alloc_fix_len()
427 rlen + args->minleft); in xfs_alloc_fix_len()
428 args->len = rlen; in xfs_alloc_fix_len()
445 xfs_extlen_t rlen, /* length of returned extent */ in xfs_alloc_fixup_trees() argument
517 if (rbno == fbno && rlen == flen) in xfs_alloc_fixup_trees()
520 nfbno1 = rbno + rlen; in xfs_alloc_fixup_trees()
521 nflen1 = flen - rlen; in xfs_alloc_fixup_trees()
523 } else if (rbno + rlen == fbno + flen) { in xfs_alloc_fixup_trees()
525 nflen1 = flen - rlen; in xfs_alloc_fixup_trees()
530 nfbno2 = rbno + rlen; in xfs_alloc_fixup_trees()
1603 xfs_extlen_t rlen; /* length of returned extent */ in xfs_alloc_ag_vextent_size() local
1641 &rlen, &busy_gen); in xfs_alloc_ag_vextent_size()
1656 &rbno, &rlen, &busy_gen); in xfs_alloc_ag_vextent_size()
1658 if (rlen >= args->maxlen) in xfs_alloc_ag_vextent_size()
1686 rlen = XFS_EXTLEN_MIN(args->maxlen, rlen); in xfs_alloc_ag_vextent_size()
1688 rlen != 0 && in xfs_alloc_ag_vextent_size()
1689 (rlen > flen || in xfs_alloc_ag_vextent_size()
1690 rbno + rlen > fbno + flen))) { in xfs_alloc_ag_vextent_size()
1694 if (rlen < args->maxlen) { in xfs_alloc_ag_vextent_size()
1700 bestrlen = rlen; in xfs_alloc_ag_vextent_size()
1719 &rbno, &rlen, &busy_gen); in xfs_alloc_ag_vextent_size()
1720 rlen = XFS_EXTLEN_MIN(args->maxlen, rlen); in xfs_alloc_ag_vextent_size()
1722 rlen != 0 && in xfs_alloc_ag_vextent_size()
1723 (rlen > flen || in xfs_alloc_ag_vextent_size()
1724 rbno + rlen > fbno + flen))) { in xfs_alloc_ag_vextent_size()
1728 if (rlen > bestrlen) { in xfs_alloc_ag_vextent_size()
1729 bestrlen = rlen; in xfs_alloc_ag_vextent_size()
1733 if (rlen == args->maxlen) in xfs_alloc_ag_vextent_size()
1744 rlen = bestrlen; in xfs_alloc_ag_vextent_size()
1753 args->len = rlen; in xfs_alloc_ag_vextent_size()
1754 if (rlen < args->minlen) { in xfs_alloc_ag_vextent_size()
1765 rlen = args->len; in xfs_alloc_ag_vextent_size()
1766 if (XFS_IS_CORRUPT(args->mp, rlen > flen)) { in xfs_alloc_ag_vextent_size()
1776 rbno, rlen, XFSA_FIXUP_CNT_OK))) in xfs_alloc_ag_vextent_size()
1781 args->len = rlen; in xfs_alloc_ag_vextent_size()