dm-mpath.c (bef986502fa398b1785a3979b1aa17cd902d3527) | dm-mpath.c (c922d5f7f5457da9e9b5a26dd53e2dcef6ca2f7d) |
---|---|
1/* 2 * Copyright (C) 2003 Sistina Software Limited. 3 * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. 4 * 5 * This file is released under the GPL. 6 */ 7 8#include "dm.h" --- 17 unchanged lines hidden (view full) --- 26 27/* Path properties */ 28struct pgpath { 29 struct list_head list; 30 31 struct priority_group *pg; /* Owning PG */ 32 unsigned fail_count; /* Cumulative failure count */ 33 | 1/* 2 * Copyright (C) 2003 Sistina Software Limited. 3 * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. 4 * 5 * This file is released under the GPL. 6 */ 7 8#include "dm.h" --- 17 unchanged lines hidden (view full) --- 26 27/* Path properties */ 28struct pgpath { 29 struct list_head list; 30 31 struct priority_group *pg; /* Owning PG */ 32 unsigned fail_count; /* Cumulative failure count */ 33 |
34 struct path path; | 34 struct dm_path path; |
35}; 36 37#define path_to_pgpath(__pgp) container_of((__pgp), struct pgpath, path) 38 39/* 40 * Paths are grouped into Priority Groups and numbered from 1 upwards. 41 * Each has a path selector which controls which path gets used. 42 */ --- 181 unchanged lines hidden (view full) --- 224 } else { 225 m->pg_init_required = 0; 226 m->queue_io = 0; 227 } 228} 229 230static int __choose_path_in_pg(struct multipath *m, struct priority_group *pg) 231{ | 35}; 36 37#define path_to_pgpath(__pgp) container_of((__pgp), struct pgpath, path) 38 39/* 40 * Paths are grouped into Priority Groups and numbered from 1 upwards. 41 * Each has a path selector which controls which path gets used. 42 */ --- 181 unchanged lines hidden (view full) --- 224 } else { 225 m->pg_init_required = 0; 226 m->queue_io = 0; 227 } 228} 229 230static int __choose_path_in_pg(struct multipath *m, struct priority_group *pg) 231{ |
232 struct path *path; | 232 struct dm_path *path; |
233 234 path = pg->ps.type->select_path(&pg->ps, &m->repeat_count); 235 if (!path) 236 return -ENXIO; 237 238 m->current_pgpath = path_to_pgpath(path); 239 240 if (m->current_pg != pg) --- 711 unchanged lines hidden (view full) --- 952 953 bypass_pg(m, pg, bypassed); 954 return 0; 955} 956 957/* 958 * pg_init must call this when it has completed its initialisation 959 */ | 233 234 path = pg->ps.type->select_path(&pg->ps, &m->repeat_count); 235 if (!path) 236 return -ENXIO; 237 238 m->current_pgpath = path_to_pgpath(path); 239 240 if (m->current_pg != pg) --- 711 unchanged lines hidden (view full) --- 952 953 bypass_pg(m, pg, bypassed); 954 return 0; 955} 956 957/* 958 * pg_init must call this when it has completed its initialisation 959 */ |
960void dm_pg_init_complete(struct path *path, unsigned err_flags) | 960void dm_pg_init_complete(struct dm_path *path, unsigned err_flags) |
961{ 962 struct pgpath *pgpath = path_to_pgpath(path); 963 struct priority_group *pg = pgpath->pg; 964 struct multipath *m = pg->m; 965 unsigned long flags; 966 967 /* We insist on failing the path if the PG is already bypassed. */ 968 if (err_flags && pg->bypassed) --- 402 unchanged lines hidden --- | 961{ 962 struct pgpath *pgpath = path_to_pgpath(path); 963 struct priority_group *pg = pgpath->pg; 964 struct multipath *m = pg->m; 965 unsigned long flags; 966 967 /* We insist on failing the path if the PG is already bypassed. */ 968 if (err_flags && pg->bypassed) --- 402 unchanged lines hidden --- |