Lines Matching refs:rlen
409 xfs_extlen_t rlen; in xfs_alloc_fix_len() local
412 rlen = args->len; in xfs_alloc_fix_len()
413 ASSERT(rlen >= args->minlen); in xfs_alloc_fix_len()
414 ASSERT(rlen <= args->maxlen); in xfs_alloc_fix_len()
415 if (args->prod <= 1 || rlen < args->mod || rlen == args->maxlen || in xfs_alloc_fix_len()
416 (args->mod == 0 && rlen < args->prod)) in xfs_alloc_fix_len()
418 k = rlen % args->prod; in xfs_alloc_fix_len()
422 rlen = rlen - (k - args->mod); in xfs_alloc_fix_len()
424 rlen = rlen - args->prod + (args->mod - k); in xfs_alloc_fix_len()
426 if ((int)rlen < (int)args->minlen) in xfs_alloc_fix_len()
428 ASSERT(rlen >= args->minlen && rlen <= args->maxlen); in xfs_alloc_fix_len()
429 ASSERT(rlen % args->prod == args->mod); in xfs_alloc_fix_len()
431 rlen + args->minleft); in xfs_alloc_fix_len()
432 args->len = rlen; in xfs_alloc_fix_len()
449 xfs_extlen_t rlen, /* length of returned extent */ in xfs_alloc_fixup_trees() argument
521 if (rbno == fbno && rlen == flen) in xfs_alloc_fixup_trees()
524 nfbno1 = rbno + rlen; in xfs_alloc_fixup_trees()
525 nflen1 = flen - rlen; in xfs_alloc_fixup_trees()
527 } else if (rbno + rlen == fbno + flen) { in xfs_alloc_fixup_trees()
529 nflen1 = flen - rlen; in xfs_alloc_fixup_trees()
534 nfbno2 = rbno + rlen; in xfs_alloc_fixup_trees()
1683 xfs_extlen_t rlen; /* length of returned extent */ in xfs_alloc_ag_vextent_size() local
1721 &rlen, &busy_gen); in xfs_alloc_ag_vextent_size()
1736 &rbno, &rlen, &busy_gen); in xfs_alloc_ag_vextent_size()
1738 if (rlen >= args->maxlen) in xfs_alloc_ag_vextent_size()
1766 rlen = XFS_EXTLEN_MIN(args->maxlen, rlen); in xfs_alloc_ag_vextent_size()
1768 rlen != 0 && in xfs_alloc_ag_vextent_size()
1769 (rlen > flen || in xfs_alloc_ag_vextent_size()
1770 rbno + rlen > fbno + flen))) { in xfs_alloc_ag_vextent_size()
1774 if (rlen < args->maxlen) { in xfs_alloc_ag_vextent_size()
1780 bestrlen = rlen; in xfs_alloc_ag_vextent_size()
1799 &rbno, &rlen, &busy_gen); in xfs_alloc_ag_vextent_size()
1800 rlen = XFS_EXTLEN_MIN(args->maxlen, rlen); in xfs_alloc_ag_vextent_size()
1802 rlen != 0 && in xfs_alloc_ag_vextent_size()
1803 (rlen > flen || in xfs_alloc_ag_vextent_size()
1804 rbno + rlen > fbno + flen))) { in xfs_alloc_ag_vextent_size()
1808 if (rlen > bestrlen) { in xfs_alloc_ag_vextent_size()
1809 bestrlen = rlen; in xfs_alloc_ag_vextent_size()
1813 if (rlen == args->maxlen) in xfs_alloc_ag_vextent_size()
1824 rlen = bestrlen; in xfs_alloc_ag_vextent_size()
1833 args->len = rlen; in xfs_alloc_ag_vextent_size()
1834 if (rlen < args->minlen) { in xfs_alloc_ag_vextent_size()
1845 rlen = args->len; in xfs_alloc_ag_vextent_size()
1846 if (XFS_IS_CORRUPT(args->mp, rlen > flen)) { in xfs_alloc_ag_vextent_size()
1856 rbno, rlen, XFSA_FIXUP_CNT_OK))) in xfs_alloc_ag_vextent_size()
1861 args->len = rlen; in xfs_alloc_ag_vextent_size()