BIO_MAX_VECS
nr_vecs = iov_iter_npages(iter, BIO_MAX_VECS + 1);
if (nr_vecs > BIO_MAX_VECS)
WARN_ON_ONCE(bio->bi_max_vecs > BIO_MAX_VECS);
if (bio->bi_max_vecs == BIO_MAX_VECS)
{ .nr_vecs = BIO_MAX_VECS, .name = "biovec-max" },
nr_vecs = BIO_MAX_VECS;
case 129 ... BIO_MAX_VECS:
static unsigned int num_prealloc_bounce_pg = BIO_MAX_VECS;
nr_enc_pages = min(bio_segments(src_bio), BIO_MAX_VECS);
return min(pages, (sector_t)BIO_MAX_VECS);
unsigned int nr_vecs = iov_iter_npages(iter, BIO_MAX_VECS);
unsigned int max_segments = min(BIO_MAX_VECS, lim->max_segments);
nr_pages = bio_iov_vecs_to_alloc(iter, BIO_MAX_VECS);
nr_pages = bio_iov_vecs_to_alloc(iter, BIO_MAX_VECS + 1);
if (likely(nr_pages <= BIO_MAX_VECS &&
#if DRBD_MAX_BIO_SIZE > (BIO_MAX_VECS << PAGE_SHIFT)
size_limit = min_t(unsigned int, BIO_MAX_VECS * PAGE_SECTORS,
.max_segments = BIO_MAX_VECS,
#define DM_CRYPT_MIN_PAGES_PER_CLIENT (BIO_MAX_VECS * 16)
val = min(val, BIO_MAX_VECS << PAGE_SHIFT);
ret = mempool_init(&cc->page_pool, BIO_MAX_VECS, crypt_page_alloc, crypt_page_free, cc);
BIO_MAX_VECS << PAGE_SECTORS_SHIFT);
BIO_MAX_VECS << PAGE_SHIFT);
BIO_MAX_VECS << PAGE_SHIFT);
MAX_BLOCKS_PER_VIO = (BIO_MAX_VECS << PAGE_SHIFT) / VDO_BLOCK_SIZE,
g->wc_list_contiguous = BIO_MAX_VECS;
if (unlikely(e->wc_list_contiguous == BIO_MAX_VECS)) {
BIO_MAX_VECS * (PAGE_SIZE >> 9));
struct bio *bio = bio_alloc_bioset(log->rdev->bdev, BIO_MAX_VECS,
bio = bio_alloc_bioset(prev->bi_bdev, BIO_MAX_VECS,
max_hw_sectors = min_not_zero(BIO_MAX_VECS << PAGE_SECTORS_SHIFT,
if (req->sg_cnt > BIO_MAX_VECS)
cmd->tvc_sgl_count > BIO_MAX_VECS) {
len = min_t(u64, len, fs_info->sectorsize * BIO_MAX_VECS);
bbio = btrfs_bio_alloc(BIO_MAX_VECS, bio_ctrl->opf, inode,
bbio = btrfs_bio_alloc(BIO_MAX_VECS, REQ_OP_READ, inode, 0,
bbio = btrfs_bio_alloc(BIO_MAX_VECS, REQ_OP_READ, inode, 0,
bbio = btrfs_bio_alloc(BIO_MAX_VECS, op, BTRFS_I(fs_info->btree_inode),
bbio = btrfs_bio_alloc(BIO_MAX_VECS, op,
to_copy = min_t(u64, to_copy, BIO_MAX_VECS << PAGE_SHIFT);
stream->sreq_max_segs = BIO_MAX_VECS;
BUILD_BUG_ON(ARRAY_SIZE(pages) > BIO_MAX_VECS);
bio = bio_alloc(inode->i_sb->s_bdev, BIO_MAX_VECS, REQ_OP_WRITE,
for (n = 0; n < BIO_MAX_VECS; n++) {
bio = bio_alloc(mdev.m_bdev, BIO_MAX_VECS,
bio = bio_alloc(bh->b_bdev, BIO_MAX_VECS, REQ_OP_WRITE, GFP_NOIO);
bio = __bio_alloc(fio, BIO_MAX_VECS);
io->bio = __bio_alloc(fio, BIO_MAX_VECS);
#define RECOVERY_MAX_RA_BLOCKS BIO_MAX_VECS
readed = f2fs_ra_meta_pages(sbi, start_blk, BIO_MAX_VECS,
return 8 * BIO_MAX_VECS;
desired = BIO_MAX_VECS;
struct bio *bio = bio_alloc(sb->s_bdev, BIO_MAX_VECS, opf, GFP_NOIO);
if (WARN_ON_ONCE(nr_vecs > BIO_MAX_VECS))
nr_vecs = bio_iov_vecs_to_alloc(dio->submit.iter, BIO_MAX_VECS);
bio = bio_alloc_bioset(wpc->iomap.bdev, BIO_MAX_VECS,
bio = bio_alloc(bdev, BIO_MAX_VECS,
wi->max_pages = BIO_MAX_VECS;
new = bio_alloc(bdev, BIO_MAX_VECS, REQ_OP_WRITE, GFP_NOFS);
static_assert(XFS_GC_NR_BUFS < BIO_MAX_VECS);
return min(nr_segs, BIO_MAX_VECS);
return iov_iter_npages(iter, BIO_MAX_VECS);
return iov_iter_npages(iter, BIO_MAX_VECS - 1) + 1;