Lines Matching refs:maxlen
243 xfs_extlen_t maxlen, /* maximum length to allocate */ in xfs_rtallocate_extent_block() argument
268 maxlen = xfs_rtallocate_clamp_len(mp, i, maxlen, prod); in xfs_rtallocate_extent_block()
274 error = xfs_rtcheck_range(mp, tp, i, maxlen, 1, &next, &stat); in xfs_rtallocate_extent_block()
282 error = xfs_rtallocate_range(mp, tp, i, maxlen, rbpp, in xfs_rtallocate_extent_block()
287 *len = maxlen; in xfs_rtallocate_extent_block()
297 if (minlen < maxlen) { in xfs_rtallocate_extent_block()
320 if (minlen < maxlen && besti != -1) { in xfs_rtallocate_extent_block()
363 xfs_extlen_t maxlen, /* maximum length to allocate */ in xfs_rtallocate_extent_exact() argument
376 ASSERT(maxlen % prod == 0); in xfs_rtallocate_extent_exact()
380 error = xfs_rtcheck_range(mp, tp, bno, maxlen, 1, &next, &isfree); in xfs_rtallocate_extent_exact()
388 error = xfs_rtallocate_range(mp, tp, bno, maxlen, rbpp, rsb); in xfs_rtallocate_extent_exact()
392 *len = maxlen; in xfs_rtallocate_extent_exact()
399 maxlen = next - bno; in xfs_rtallocate_extent_exact()
400 if (maxlen < minlen) { in xfs_rtallocate_extent_exact()
410 if (prod > 1 && (i = maxlen % prod)) { in xfs_rtallocate_extent_exact()
411 maxlen -= i; in xfs_rtallocate_extent_exact()
412 if (maxlen < minlen) { in xfs_rtallocate_extent_exact()
423 error = xfs_rtallocate_range(mp, tp, bno, maxlen, rbpp, rsb); in xfs_rtallocate_extent_exact()
427 *len = maxlen; in xfs_rtallocate_extent_exact()
443 xfs_extlen_t maxlen, /* maximum length to allocate */ in xfs_rtallocate_extent_near() argument
460 ASSERT(maxlen % prod == 0); in xfs_rtallocate_extent_near()
470 maxlen = xfs_rtallocate_clamp_len(mp, bno, maxlen, prod); in xfs_rtallocate_extent_near()
471 if (maxlen < minlen) { in xfs_rtallocate_extent_near()
479 error = xfs_rtallocate_extent_exact(mp, tp, bno, minlen, maxlen, len, in xfs_rtallocate_extent_near()
522 bbno + i, minlen, maxlen, len, &n, rbpp, in xfs_rtallocate_extent_near()
567 tp, bbno + j, minlen, maxlen, in xfs_rtallocate_extent_near()
589 bbno + i, minlen, maxlen, len, &n, rbpp, in xfs_rtallocate_extent_near()
647 xfs_extlen_t maxlen, /* maximum length to allocate */ in xfs_rtallocate_extent_size() argument
662 ASSERT(maxlen % prod == 0); in xfs_rtallocate_extent_size()
663 ASSERT(maxlen != 0); in xfs_rtallocate_extent_size()
672 for (l = xfs_highbit32(maxlen); l < mp->m_rsumlevels; l++) { in xfs_rtallocate_extent_size()
693 error = xfs_rtallocate_extent_block(mp, tp, i, maxlen, in xfs_rtallocate_extent_size()
694 maxlen, len, &n, rbpp, rsb, prod, &r); in xfs_rtallocate_extent_size()
718 if (minlen > --maxlen) { in xfs_rtallocate_extent_size()
723 ASSERT(maxlen != 0); in xfs_rtallocate_extent_size()
730 for (l = xfs_highbit32(maxlen); l >= xfs_highbit32(minlen); l--) { in xfs_rtallocate_extent_size()
756 XFS_RTMIN(maxlen, (1 << (l + 1)) - 1), in xfs_rtallocate_extent_size()
1200 xfs_extlen_t maxlen, /* maximum length to allocate */ in xfs_rtallocate_extent() argument
1213 ASSERT(minlen > 0 && minlen <= maxlen); in xfs_rtallocate_extent()
1221 if ((i = maxlen % prod)) in xfs_rtallocate_extent()
1222 maxlen -= i; in xfs_rtallocate_extent()
1225 if (maxlen < minlen) { in xfs_rtallocate_extent()
1234 error = xfs_rtallocate_extent_size(mp, tp, minlen, maxlen, len, in xfs_rtallocate_extent()
1237 error = xfs_rtallocate_extent_near(mp, tp, bno, minlen, maxlen, in xfs_rtallocate_extent()
1250 ASSERT(*len >= minlen && *len <= maxlen); in xfs_rtallocate_extent()