Home
last modified time | relevance | path

Searched refs:idx (Results 1 – 9 of 9) sorted by relevance

/block/
Dbio.c150 unsigned int bvec_nr_vecs(unsigned short idx) in bvec_nr_vecs() argument
152 return bvec_slabs[--idx].nr_vecs; in bvec_nr_vecs()
155 void bvec_free(mempool_t *pool, struct bio_vec *bv, unsigned int idx) in bvec_free() argument
157 if (!idx) in bvec_free()
159 idx--; in bvec_free()
161 BIO_BUG_ON(idx >= BVEC_POOL_NR); in bvec_free()
163 if (idx == BVEC_POOL_MAX) { in bvec_free()
166 struct biovec_slab *bvs = bvec_slabs + idx; in bvec_free()
172 struct bio_vec *bvec_alloc(gfp_t gfp_mask, int nr, unsigned long *idx, in bvec_alloc() argument
182 *idx = 0; in bvec_alloc()
[all …]
Dblk-cgroup-rwstat.h36 unsigned int idx) in blkg_rwstat_read_counter() argument
38 return atomic64_read(&rwstat->aux_cnt[idx]) + in blkg_rwstat_read_counter()
39 percpu_counter_sum_positive(&rwstat->cpu_cnt[idx]); in blkg_rwstat_read_counter()
Dblk-zoned.c266 static int blkdev_copy_zone_to_user(struct blk_zone *zone, unsigned int idx, in blkdev_copy_zone_to_user() argument
271 if (copy_to_user(&args->zones[idx], zone, sizeof(struct blk_zone))) in blkdev_copy_zone_to_user()
428 static int blk_revalidate_zone_cb(struct blk_zone *zone, unsigned int idx, in blk_revalidate_zone_cb() argument
479 set_bit(idx, args->conv_zones_bitmap); in blk_revalidate_zone_cb()
Dbio-integrity.c75 unsigned long idx = 0; in bio_integrity_alloc() local
77 bip->bip_vec = bvec_alloc(gfp_mask, nr_vecs, &idx, in bio_integrity_alloc()
81 bip->bip_max_vcnt = bvec_nr_vecs(idx); in bio_integrity_alloc()
82 bip->bip_slab = idx; in bio_integrity_alloc()
Dgenhd.c205 piter->idx = ptbl->len - 1; in disk_part_iter_init()
207 piter->idx = 0; in disk_part_iter_init()
209 piter->idx = 1; in disk_part_iter_init()
253 for (; piter->idx != end; piter->idx += inc) { in disk_part_iter_next()
256 part = rcu_dereference(ptbl->part[piter->idx]); in disk_part_iter_next()
264 piter->idx == 0)) { in disk_part_iter_next()
270 piter->idx += inc; in disk_part_iter_next()
577 int idx; in blk_alloc_devt() local
589 idx = idr_alloc(&ext_devt_idr, part, 0, NR_EXT_DEVT, GFP_NOWAIT); in blk_alloc_devt()
593 if (idx < 0) in blk_alloc_devt()
[all …]
Dblk-mq-sched.c214 unsigned short idx = ctx->index_hw[hctx->type]; in blk_mq_next_ctx() local
216 if (++idx == hctx->nr_ctx) in blk_mq_next_ctx()
217 idx = 0; in blk_mq_next_ctx()
219 return hctx->ctxs[idx]; in blk_mq_next_ctx()
Dblk-iocost.c813 int idx = ioc->autop_idx; in ioc_autop_idx() local
814 const struct ioc_params *p = &autop[idx]; in ioc_autop_idx()
827 if (idx < AUTOP_SSD_DFL) in ioc_autop_idx()
832 return idx; in ioc_autop_idx()
842 return idx + 1; in ioc_autop_idx()
851 return idx - 1; in ioc_autop_idx()
856 return idx; in ioc_autop_idx()
915 int idx; in ioc_refresh_params() local
919 idx = ioc_autop_idx(ioc); in ioc_refresh_params()
920 p = &autop[idx]; in ioc_refresh_params()
[all …]
Dblk-core.c221 int idx = (__force int)status; in blk_status_to_errno() local
223 if (WARN_ON_ONCE(idx >= ARRAY_SIZE(blk_errors))) in blk_status_to_errno()
225 return blk_errors[idx].errno; in blk_status_to_errno()
232 int idx = (__force int)status; in print_req_error() local
234 if (WARN_ON_ONCE(idx >= ARRAY_SIZE(blk_errors))) in print_req_error()
240 caller, blk_errors[idx].name, in print_req_error()
Dbfq-wf2q.c694 unsigned int idx = bfq_class_idx(entity); in bfq_entity_service_tree() local
696 return sched_data->service_tree + idx; in bfq_entity_service_tree()