Lines Matching refs:path_nr
157 unsigned int path_nr; in switch_get_path_nr() local
166 path_nr = switch_region_table_read(sctx, p); in switch_get_path_nr()
169 if (unlikely(path_nr >= sctx->nr_paths)) in switch_get_path_nr()
170 path_nr = 0; in switch_get_path_nr()
172 return path_nr; in switch_get_path_nr()
195 unsigned int path_nr = 0; in initialise_region_table() local
199 switch_region_table_write(sctx, region_nr, path_nr); in initialise_region_table()
200 if (++path_nr >= sctx->nr_paths) in initialise_region_table()
201 path_nr = 0; in initialise_region_table()
324 unsigned int path_nr = switch_get_path_nr(sctx, offset); in switch_map() local
326 bio_set_dev(bio, sctx->path_list[path_nr].dmdev->bdev); in switch_map()
327 bio->bi_iter.bi_sector = sctx->path_list[path_nr].start + offset; in switch_map()
381 unsigned long path_nr; in process_set_region_mappings() local
422 path_nr = switch_region_table_read(sctx, region_index - cycle_length); in process_set_region_mappings()
423 switch_region_table_write(sctx, region_index, path_nr); in process_set_region_mappings()
445 path_nr = parse_hex(&string); in process_set_region_mappings()
454 if (unlikely(path_nr >= sctx->nr_paths)) { in process_set_region_mappings()
455 DMWARN("invalid set_region_mappings device: %lu >= %u", path_nr, sctx->nr_paths); in process_set_region_mappings()
459 switch_region_table_write(sctx, region_index, path_nr); in process_set_region_mappings()
495 int path_nr; in switch_status() local
504 for (path_nr = 0; path_nr < sctx->nr_paths; path_nr++) in switch_status()
505 DMEMIT(" %s %llu", sctx->path_list[path_nr].dmdev->name, in switch_status()
506 (unsigned long long)sctx->path_list[path_nr].start); in switch_status()
525 unsigned int path_nr; in switch_prepare_ioctl() local
527 path_nr = switch_get_path_nr(sctx, 0); in switch_prepare_ioctl()
529 *bdev = sctx->path_list[path_nr].dmdev->bdev; in switch_prepare_ioctl()
534 if (ti->len + sctx->path_list[path_nr].start != in switch_prepare_ioctl()
544 int path_nr; in switch_iterate_devices() local
547 for (path_nr = 0; path_nr < sctx->nr_paths; path_nr++) { in switch_iterate_devices()
548 r = fn(ti, sctx->path_list[path_nr].dmdev, in switch_iterate_devices()
549 sctx->path_list[path_nr].start, ti->len, data); in switch_iterate_devices()