| /linux/block/ |
| H A D | bio-integrity.c | 70 struct bio_vec *bvecs, unsigned int nr_vecs) in bio_integrity_init() argument 73 bip->bip_max_vcnt = nr_vecs; in bio_integrity_init() 74 if (nr_vecs) in bio_integrity_init() 93 unsigned int nr_vecs) in bio_integrity_alloc() argument 100 bia = kmalloc_flex(*bia, bvecs, nr_vecs, gfp_mask); in bio_integrity_alloc() 103 bio_integrity_init(bio, &bia->bip, bia->bvecs, nr_vecs); in bio_integrity_alloc() 108 static void bio_integrity_unpin_bvec(struct bio_vec *bv, int nr_vecs) in bio_integrity_unpin_bvec() argument 112 for (i = 0; i < nr_vecs; i++) in bio_integrity_unpin_bvec() 199 int nr_vecs, unsigned int len) in bio_integrity_copy_user() argument 212 iov_iter_bvec(&iter, ITER_SOURCE, bvec, nr_vecs, len); in bio_integrity_copy_user() [all …]
|
| H A D | bio.c | 38 int nr_vecs; member 42 { .nr_vecs = 16, .name = "biovec-16" }, 43 { .nr_vecs = 64, .name = "biovec-64" }, 44 { .nr_vecs = 128, .name = "biovec-128" }, 45 { .nr_vecs = BIO_MAX_VECS, .name = "biovec-max" }, 48 static struct biovec_slab *biovec_slab(unsigned short nr_vecs) in biovec_slab() argument 50 switch (nr_vecs) { in biovec_slab() 162 void bvec_free(mempool_t *pool, struct bio_vec *bv, unsigned short nr_vecs) in bvec_free() argument 164 BUG_ON(nr_vecs > BIO_MAX_VECS); in bvec_free() 166 if (nr_vecs == BIO_MAX_VECS) in bvec_free() [all …]
|
| H A D | blk-map.c | 46 unsigned int nr_vecs, gfp_t gfp_mask) in blk_rq_map_bio_alloc() argument 51 bio = bio_alloc_bioset(bdev, nr_vecs, rq->cmd_flags, gfp_mask, in blk_rq_map_bio_alloc() 263 unsigned int nr_vecs = iov_iter_npages(iter, BIO_MAX_VECS); in bio_map_user_iov() local 270 bio = blk_rq_map_bio_alloc(rq, nr_vecs, gfp_mask); in bio_map_user_iov() 314 unsigned int nr_vecs = bio_add_max_vecs(data, len); in bio_map_kern() local 317 bio = blk_rq_map_bio_alloc(rq, nr_vecs, gfp_mask); in bio_map_kern()
|
| /linux/drivers/crypto/cavium/nitrox/ |
| H A D | nitrox_isr.c | 294 int nr_vecs, vec, cpu; in nitrox_register_interrupts() local 309 nr_vecs = pci_msix_vec_count(pdev); in nitrox_register_interrupts() 310 if (nr_vecs < 0) { in nitrox_register_interrupts() 311 dev_err(DEV(ndev), "Error in getting vec count %d\n", nr_vecs); in nitrox_register_interrupts() 312 return nr_vecs; in nitrox_register_interrupts() 316 ret = pci_alloc_irq_vectors(pdev, nr_vecs, nr_vecs, PCI_IRQ_MSIX); in nitrox_register_interrupts() 318 dev_err(DEV(ndev), "msix vectors %d alloc failed\n", nr_vecs); in nitrox_register_interrupts() 321 ndev->num_vecs = nr_vecs; in nitrox_register_interrupts() 323 ndev->qvec = kzalloc_objs(*qvec, nr_vecs); in nitrox_register_interrupts() 330 for (i = PKT_RING_MSIX_BASE; i < (nr_vecs - 1); i += NR_RING_VECTORS) { in nitrox_register_interrupts()
|
| /linux/fs/iomap/ |
| H A D | direct-io.c | 54 struct iomap_dio *dio, unsigned short nr_vecs, blk_opf_t opf) in iomap_dio_alloc_bio() argument 57 return bio_alloc_bioset(iter->iomap.bdev, nr_vecs, opf, in iomap_dio_alloc_bio() 59 return bio_alloc(iter->iomap.bdev, nr_vecs, opf, GFP_KERNEL); in iomap_dio_alloc_bio() 300 int nr_vecs = max(1, i_blocksize(inode) / folio_size(zero_folio)); in iomap_dio_zero() local 309 if (WARN_ON_ONCE(nr_vecs > BIO_MAX_VECS)) in iomap_dio_zero() 312 bio = iomap_dio_alloc_bio(iter, dio, nr_vecs, in iomap_dio_zero() 335 unsigned int nr_vecs; in iomap_dio_bio_iter_one() local 340 nr_vecs = bio_iov_bounce_nr_vecs(dio->submit.iter, op); in iomap_dio_bio_iter_one() 342 nr_vecs = bio_iov_vecs_to_alloc(dio->submit.iter, BIO_MAX_VECS); in iomap_dio_bio_iter_one() 344 bio = iomap_dio_alloc_bio(iter, dio, nr_vecs, op); in iomap_dio_bio_iter_one()
|
| H A D | bio.c | 45 unsigned int nr_vecs = DIV_ROUND_UP(length, PAGE_SIZE); in iomap_bio_read_folio_range() local 52 bio = bio_alloc(iomap->bdev, bio_max_segs(nr_vecs), REQ_OP_READ, in iomap_bio_read_folio_range()
|
| /linux/drivers/virt/nitro_enclaves/ |
| H A D | ne_pci_dev.c | 298 int nr_vecs = 0; in ne_setup_msix() local 301 nr_vecs = pci_msix_vec_count(pdev); in ne_setup_msix() 302 if (nr_vecs < 0) { in ne_setup_msix() 303 rc = nr_vecs; in ne_setup_msix() 310 rc = pci_alloc_irq_vectors(pdev, nr_vecs, nr_vecs, PCI_IRQ_MSIX); in ne_setup_msix()
|
| /linux/tools/testing/selftests/ublk/ |
| H A D | stripe.c | 47 unsigned nr_vecs = calculate_nr_vec(conf, iod); in alloc_stripe_array() local 48 unsigned total = nr_vecs * conf->nr_files; in alloc_stripe_array() 59 t->vec = &s->_vec[i * nr_vecs]; in alloc_stripe_array() 61 t->cap = nr_vecs; in alloc_stripe_array()
|
| /linux/drivers/target/ |
| H A D | target_core_pscsi.c | 833 int nr_vecs = 0, rc; in pscsi_map_sg() local 861 nr_vecs = bio_max_segs(nr_pages); in pscsi_map_sg() 862 bio = bio_kmalloc(nr_vecs, GFP_KERNEL); in pscsi_map_sg() 865 bio_init_inline(bio, NULL, nr_vecs, in pscsi_map_sg() 871 (rw) ? "rw" : "r", nr_vecs); in pscsi_map_sg() 880 bio_segments(bio), nr_vecs); in pscsi_map_sg()
|
| /linux/include/linux/ |
| H A D | bio.h | 352 struct bio *bio_alloc_bioset(struct block_device *bdev, unsigned short nr_vecs, 355 struct bio *bio_kmalloc(unsigned short nr_vecs, gfp_t gfp_mask); 366 unsigned short nr_vecs, blk_opf_t opf, gfp_t gfp_mask) in bio_alloc() argument 368 return bio_alloc_bioset(bdev, nr_vecs, opf, gfp_mask, &fs_bio_set); in bio_alloc()
|
| /linux/lib/ |
| H A D | iov_iter.c | 1899 size_t max_size, unsigned short *nr_vecs, in iov_iter_extract_bvecs() argument 1902 unsigned short entries_left = max_vecs - *nr_vecs; in iov_iter_extract_bvecs() 1914 pages = (struct page **)(bv + *nr_vecs) + in iov_iter_extract_bvecs() 1926 if (*nr_vecs > 0 && in iov_iter_extract_bvecs() 1927 !zone_device_pages_have_same_pgmap(bv[*nr_vecs - 1].bv_page, in iov_iter_extract_bvecs() 1932 bvec_set_page(&bv[*nr_vecs], pages[i], len, offset); in iov_iter_extract_bvecs() 1934 (*nr_vecs)++; in iov_iter_extract_bvecs()
|
| /linux/fs/btrfs/ |
| H A D | bio.c | 66 struct btrfs_bio *btrfs_bio_alloc(unsigned int nr_vecs, blk_opf_t opf, in btrfs_bio_alloc() argument 73 bio = bio_alloc_bioset(NULL, nr_vecs, opf, GFP_NOFS, &btrfs_bioset); in btrfs_bio_alloc()
|
| H A D | scrub.c | 945 unsigned int nr_vecs, blk_opf_t opf, in alloc_scrub_bbio() argument 951 bbio = btrfs_bio_alloc(nr_vecs, opf, BTRFS_I(fs_info->btree_inode), in alloc_scrub_bbio()
|
| /linux/fs/xfs/ |
| H A D | xfs_buf.c | 1334 unsigned int nr_vecs = bio_add_max_vecs(bp->b_addr, len); in xfs_buf_submit_bio() local 1339 bio = bio_alloc(bp->b_target->bt_bdev, nr_vecs, xfs_buf_bio_op(bp), in xfs_buf_submit_bio()
|
| /linux/fs/xfs/scrub/ |
| H A D | trace.h | 235 __field(unsigned short, nr_vecs) 245 __entry->nr_vecs = vhead->svh_nr; 255 __entry->nr_vecs)
|