Lines Matching refs:path_nr

156 	unsigned path_nr;  in switch_get_path_nr()  local
165 path_nr = switch_region_table_read(sctx, p); in switch_get_path_nr()
168 if (unlikely(path_nr >= sctx->nr_paths)) in switch_get_path_nr()
169 path_nr = 0; in switch_get_path_nr()
171 return path_nr; in switch_get_path_nr()
194 unsigned path_nr = 0; in initialise_region_table() local
198 switch_region_table_write(sctx, region_nr, path_nr); in initialise_region_table()
199 if (++path_nr >= sctx->nr_paths) in initialise_region_table()
200 path_nr = 0; in initialise_region_table()
323 unsigned path_nr = switch_get_path_nr(sctx, offset); in switch_map() local
325 bio->bi_bdev = sctx->path_list[path_nr].dmdev->bdev; in switch_map()
326 bio->bi_iter.bi_sector = sctx->path_list[path_nr].start + offset; in switch_map()
380 unsigned long path_nr; in process_set_region_mappings() local
421 path_nr = switch_region_table_read(sctx, region_index - cycle_length); in process_set_region_mappings()
422 switch_region_table_write(sctx, region_index, path_nr); in process_set_region_mappings()
444 path_nr = parse_hex(&string); in process_set_region_mappings()
453 if (unlikely(path_nr >= sctx->nr_paths)) { in process_set_region_mappings()
454 DMWARN("invalid set_region_mappings device: %lu >= %u", path_nr, sctx->nr_paths); in process_set_region_mappings()
458 switch_region_table_write(sctx, region_index, path_nr); in process_set_region_mappings()
493 int path_nr; in switch_status() local
502 for (path_nr = 0; path_nr < sctx->nr_paths; path_nr++) in switch_status()
503 DMEMIT(" %s %llu", sctx->path_list[path_nr].dmdev->name, in switch_status()
504 (unsigned long long)sctx->path_list[path_nr].start); in switch_status()
520 unsigned path_nr; in switch_ioctl() local
523 path_nr = switch_get_path_nr(sctx, 0); in switch_ioctl()
525 bdev = sctx->path_list[path_nr].dmdev->bdev; in switch_ioctl()
526 mode = sctx->path_list[path_nr].dmdev->mode; in switch_ioctl()
531 if (ti->len + sctx->path_list[path_nr].start != i_size_read(bdev->bd_inode) >> SECTOR_SHIFT) in switch_ioctl()
541 int path_nr; in switch_iterate_devices() local
544 for (path_nr = 0; path_nr < sctx->nr_paths; path_nr++) { in switch_iterate_devices()
545 r = fn(ti, sctx->path_list[path_nr].dmdev, in switch_iterate_devices()
546 sctx->path_list[path_nr].start, ti->len, data); in switch_iterate_devices()