• Home
  • Raw
  • Download

Lines Matching refs:nr_paths

41 	unsigned nr_paths;		/* Number of paths in path_list. */  member
59 static struct switch_ctx *alloc_switch_ctx(struct dm_target *ti, unsigned nr_paths, in alloc_switch_ctx() argument
64 sctx = kzalloc(struct_size(sctx, path_list, nr_paths), GFP_KERNEL); in alloc_switch_ctx()
76 static int alloc_region_table(struct dm_target *ti, unsigned nr_paths) in alloc_region_table() argument
89 (region_table_slot_t)1 << sctx->region_table_entry_bits < nr_paths) in alloc_region_table()
168 if (unlikely(path_nr >= sctx->nr_paths)) in switch_get_path_nr()
199 if (++path_nr >= sctx->nr_paths) in initialise_region_table()
211 &sctx->path_list[sctx->nr_paths].dmdev); in parse_path()
219 dm_put_device(ti, sctx->path_list[sctx->nr_paths].dmdev); in parse_path()
223 sctx->path_list[sctx->nr_paths].start = start; in parse_path()
225 sctx->nr_paths++; in parse_path()
237 while (sctx->nr_paths--) in switch_dtr()
238 dm_put_device(ti, sctx->path_list[sctx->nr_paths].dmdev); in switch_dtr()
262 unsigned nr_paths, region_size, nr_optional_args; in switch_ctr() local
268 r = dm_read_arg(_args, &as, &nr_paths, &ti->error); in switch_ctr()
281 if (as.argc != nr_paths * 2) { in switch_ctr()
286 sctx = alloc_switch_ctx(ti, nr_paths, region_size); in switch_ctr()
302 r = alloc_region_table(ti, nr_paths); in switch_ctr()
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()
502 DMEMIT("%u %u 0", sctx->nr_paths, sctx->region_size); in switch_status()
503 for (path_nr = 0; path_nr < sctx->nr_paths; path_nr++) in switch_status()
540 for (path_nr = 0; path_nr < sctx->nr_paths; path_nr++) { in switch_iterate_devices()