Lines Matching refs:idx
148 unsigned int bvec_nr_vecs(unsigned short idx) in bvec_nr_vecs() argument
150 return bvec_slabs[--idx].nr_vecs; in bvec_nr_vecs()
153 void bvec_free(mempool_t *pool, struct bio_vec *bv, unsigned int idx) in bvec_free() argument
155 if (!idx) in bvec_free()
157 idx--; in bvec_free()
159 BIO_BUG_ON(idx >= BVEC_POOL_NR); in bvec_free()
161 if (idx == BVEC_POOL_MAX) { in bvec_free()
164 struct biovec_slab *bvs = bvec_slabs + idx; in bvec_free()
170 struct bio_vec *bvec_alloc(gfp_t gfp_mask, int nr, unsigned long *idx, in bvec_alloc() argument
180 *idx = 0; in bvec_alloc()
183 *idx = 1; in bvec_alloc()
186 *idx = 2; in bvec_alloc()
189 *idx = 3; in bvec_alloc()
192 *idx = 4; in bvec_alloc()
195 *idx = 5; in bvec_alloc()
205 if (*idx == BVEC_POOL_MAX) { in bvec_alloc()
209 struct biovec_slab *bvs = bvec_slabs + *idx; in bvec_alloc()
225 *idx = BVEC_POOL_MAX; in bvec_alloc()
230 (*idx)++; in bvec_alloc()
501 unsigned long idx = 0; in bio_alloc_bioset() local
503 bvl = bvec_alloc(gfp_mask, nr_iovecs, &idx, &bs->bvec_pool); in bio_alloc_bioset()
507 bvl = bvec_alloc(gfp_mask, nr_iovecs, &idx, &bs->bvec_pool); in bio_alloc_bioset()
513 bio->bi_flags |= idx << BVEC_POOL_OFFSET; in bio_alloc_bioset()