Lines Matching defs:maxlen

198  * adjusting maxlen downwards doesn't cause us to fail the alignment checks.
214 * Attempt to allocate an extent minlen<=len<=maxlen starting from
215 * bitmap block bbno. If we don't get maxlen then use prod to trim
224 xfs_rtxlen_t maxlen, /* maximum length to allocate */
248 maxlen = xfs_rtallocate_clamp_len(mp, i, maxlen, prod);
251 * See if there's a free extent of maxlen starting at i.
254 error = xfs_rtcheck_range(args, i, maxlen, 1, &next, &stat);
259 * i for maxlen is all free, allocate and return that.
261 bestlen = maxlen;
272 if (minlen < maxlen) {
292 * Searched the whole thing & didn't find a maxlen free extent.
294 if (minlen > maxlen || besti == -1) {
326 * Allocate an extent of length minlen<=len<=maxlen, starting at block
327 * bno. If we don't get maxlen then use prod to trim the length, if given.
336 xfs_rtxlen_t maxlen, /* maximum length to allocate */
347 ASSERT(maxlen % prod == 0);
349 * Check if the range in question (for maxlen) is free.
351 error = xfs_rtcheck_range(args, start, maxlen, 1, &next, &isfree);
359 maxlen = next - start;
360 if (maxlen < minlen)
366 if (prod > 1 && (i = maxlen % prod)) {
367 maxlen -= i;
368 if (maxlen < minlen)
376 error = xfs_rtallocate_range(args, start, maxlen);
379 *len = maxlen;
385 * Allocate an extent of length minlen<=len<=maxlen, starting as near
386 * to start as possible. If we don't get maxlen then use prod to trim
394 xfs_rtxlen_t maxlen, /* maximum length to allocate */
409 ASSERT(maxlen % prod == 0);
419 maxlen = xfs_rtallocate_clamp_len(mp, start, maxlen, prod);
420 if (maxlen < minlen)
426 error = xfs_rtallocate_extent_exact(args, start, minlen, maxlen, len,
456 min_t(xfs_rtblock_t, maxlen,
548 xfs_rtxlen_t maxlen, /* maximum length to allocate */
573 error = xfs_rtallocate_extent_block(args, i, minlen, maxlen,
590 * Allocate an extent of length minlen<=len<=maxlen, with no position
591 * specified. If we don't get maxlen then use prod to trim
598 xfs_rtxlen_t maxlen, /* maximum length to allocate */
607 ASSERT(maxlen % prod == 0);
608 ASSERT(maxlen != 0);
611 * Loop over all the levels starting with maxlen.
614 * extents starting there that are long enough (>= maxlen).
619 for (l = xfs_highbit32(maxlen); l < args->mp->m_rsumlevels; l++) {
620 error = xfs_rtalloc_sumlevel(args, l, minlen, maxlen, prod, len,
627 * Didn't find any maxlen blocks. Try smaller ones, unless we are
630 if (minlen > --maxlen)
633 ASSERT(maxlen != 0);
636 * Loop over sizes, from maxlen down to minlen.
639 * but make sure the specified minlen/maxlen are in the possible range
642 for (l = xfs_highbit32(maxlen); l >= xfs_highbit32(minlen); l--) {
645 min_t(xfs_rtxlen_t, maxlen, (1 << (l + 1)) - 1),