Lines Matching defs:maxlen
216 * adjusting maxlen downwards doesn't cause us to fail the alignment checks.
232 * Attempt to allocate an extent minlen<=len<=maxlen starting from
233 * bitmap block bbno. If we don't get maxlen then use prod to trim
243 xfs_extlen_t maxlen, /* maximum length to allocate */
268 maxlen = xfs_rtallocate_clamp_len(mp, i, maxlen, prod);
271 * See if there's a free extent of maxlen starting at i.
274 error = xfs_rtcheck_range(mp, tp, i, maxlen, 1, &next, &stat);
280 * i for maxlen is all free, allocate and return that.
282 error = xfs_rtallocate_range(mp, tp, i, maxlen, rbpp,
287 *len = maxlen;
297 if (minlen < maxlen) {
318 * Searched the whole thing & didn't find a maxlen free extent.
320 if (minlen < maxlen && besti != -1) {
352 * Allocate an extent of length minlen<=len<=maxlen, starting at block
353 * bno. If we don't get maxlen then use prod to trim the length, if given.
363 xfs_extlen_t maxlen, /* maximum length to allocate */
376 ASSERT(maxlen % prod == 0);
378 * Check if the range in question (for maxlen) is free.
380 error = xfs_rtcheck_range(mp, tp, bno, maxlen, 1, &next, &isfree);
388 error = xfs_rtallocate_range(mp, tp, bno, maxlen, rbpp, rsb);
392 *len = maxlen;
399 maxlen = next - bno;
400 if (maxlen < minlen) {
410 if (prod > 1 && (i = maxlen % prod)) {
411 maxlen -= i;
412 if (maxlen < minlen) {
423 error = xfs_rtallocate_range(mp, tp, bno, maxlen, rbpp, rsb);
427 *len = maxlen;
433 * Allocate an extent of length minlen<=len<=maxlen, starting as near
434 * to bno as possible. If we don't get maxlen then use prod to trim
443 xfs_extlen_t maxlen, /* maximum length to allocate */
460 ASSERT(maxlen % prod == 0);
470 maxlen = xfs_rtallocate_clamp_len(mp, bno, maxlen, prod);
471 if (maxlen < minlen) {
479 error = xfs_rtallocate_extent_exact(mp, tp, bno, minlen, maxlen, len,
522 bbno + i, minlen, maxlen, len, &n, rbpp,
567 tp, bbno + j, minlen, maxlen,
589 bbno + i, minlen, maxlen, len, &n, rbpp,
638 * Allocate an extent of length minlen<=len<=maxlen, with no position
639 * specified. If we don't get maxlen then use prod to trim
647 xfs_extlen_t maxlen, /* maximum length to allocate */
662 ASSERT(maxlen % prod == 0);
663 ASSERT(maxlen != 0);
666 * Loop over all the levels starting with maxlen.
668 * are extents starting there that are long enough (>= maxlen).
672 for (l = xfs_highbit32(maxlen); l < mp->m_rsumlevels; l++) {
693 error = xfs_rtallocate_extent_block(mp, tp, i, maxlen,
694 maxlen, len, &n, rbpp, rsb, prod, &r);
715 * Didn't find any maxlen blocks. Try smaller ones, unless
718 if (minlen > --maxlen) {
723 ASSERT(maxlen != 0);
726 * Loop over sizes, from maxlen down to minlen.
730 for (l = xfs_highbit32(maxlen); l >= xfs_highbit32(minlen); l--) {
751 * minlen/maxlen are in the possible range for
756 XFS_RTMIN(maxlen, (1 << (l + 1)) - 1),
1200 xfs_extlen_t maxlen, /* maximum length to allocate */
1213 ASSERT(minlen > 0 && minlen <= maxlen);
1216 * If prod is set then figure out what to do to minlen and maxlen.
1221 if ((i = maxlen % prod))
1222 maxlen -= i;
1225 if (maxlen < minlen) {
1234 error = xfs_rtallocate_extent_size(mp, tp, minlen, maxlen, len,
1237 error = xfs_rtallocate_extent_near(mp, tp, bno, minlen, maxlen,
1250 ASSERT(*len >= minlen && *len <= maxlen);