aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/dm-emc.c10
-rw-r--r--drivers/md/dm-hw-handler.h2
-rw-r--r--drivers/md/dm-mpath.c6
-rw-r--r--drivers/md/dm-mpath.h4
-rw-r--r--drivers/md/dm-path-selector.h12
-rw-r--r--drivers/md/dm-round-robin.c12
6 files changed, 23 insertions, 23 deletions
diff --git a/drivers/md/dm-emc.c b/drivers/md/dm-emc.c
index 2b2d45d7baaa..265c467854da 100644
--- a/drivers/md/dm-emc.c
+++ b/drivers/md/dm-emc.c
@@ -40,7 +40,7 @@ static inline void free_bio(struct bio *bio)
40 40
41static int emc_endio(struct bio *bio, unsigned int bytes_done, int error) 41static int emc_endio(struct bio *bio, unsigned int bytes_done, int error)
42{ 42{
43 struct path *path = bio->bi_private; 43 struct dm_path *path = bio->bi_private;
44 44
45 if (bio->bi_size) 45 if (bio->bi_size)
46 return 1; 46 return 1;
@@ -61,7 +61,7 @@ static int emc_endio(struct bio *bio, unsigned int bytes_done, int error)
61 return 0; 61 return 0;
62} 62}
63 63
64static struct bio *get_failover_bio(struct path *path, unsigned data_size) 64static struct bio *get_failover_bio(struct dm_path *path, unsigned data_size)
65{ 65{
66 struct bio *bio; 66 struct bio *bio;
67 struct page *page; 67 struct page *page;
@@ -96,7 +96,7 @@ static struct bio *get_failover_bio(struct path *path, unsigned data_size)
96} 96}
97 97
98static struct request *get_failover_req(struct emc_handler *h, 98static struct request *get_failover_req(struct emc_handler *h,
99 struct bio *bio, struct path *path) 99 struct bio *bio, struct dm_path *path)
100{ 100{
101 struct request *rq; 101 struct request *rq;
102 struct block_device *bdev = bio->bi_bdev; 102 struct block_device *bdev = bio->bi_bdev;
@@ -133,7 +133,7 @@ static struct request *get_failover_req(struct emc_handler *h,
133} 133}
134 134
135static struct request *emc_trespass_get(struct emc_handler *h, 135static struct request *emc_trespass_get(struct emc_handler *h,
136 struct path *path) 136 struct dm_path *path)
137{ 137{
138 struct bio *bio; 138 struct bio *bio;
139 struct request *rq; 139 struct request *rq;
@@ -191,7 +191,7 @@ static struct request *emc_trespass_get(struct emc_handler *h,
191} 191}
192 192
193static void emc_pg_init(struct hw_handler *hwh, unsigned bypassed, 193static void emc_pg_init(struct hw_handler *hwh, unsigned bypassed,
194 struct path *path) 194 struct dm_path *path)
195{ 195{
196 struct request *rq; 196 struct request *rq;
197 struct request_queue *q = bdev_get_queue(path->dev->bdev); 197 struct request_queue *q = bdev_get_queue(path->dev->bdev);
diff --git a/drivers/md/dm-hw-handler.h b/drivers/md/dm-hw-handler.h
index 15f5629e231a..32eff28e4adc 100644
--- a/drivers/md/dm-hw-handler.h
+++ b/drivers/md/dm-hw-handler.h
@@ -32,7 +32,7 @@ struct hw_handler_type {
32 void (*destroy) (struct hw_handler *hwh); 32 void (*destroy) (struct hw_handler *hwh);
33 33
34 void (*pg_init) (struct hw_handler *hwh, unsigned bypassed, 34 void (*pg_init) (struct hw_handler *hwh, unsigned bypassed,
35 struct path *path); 35 struct dm_path *path);
36 unsigned (*error) (struct hw_handler *hwh, struct bio *bio); 36 unsigned (*error) (struct hw_handler *hwh, struct bio *bio);
37 int (*status) (struct hw_handler *hwh, status_type_t type, 37 int (*status) (struct hw_handler *hwh, status_type_t type,
38 char *result, unsigned int maxlen); 38 char *result, unsigned int maxlen);
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index cf8bf052138e..e9dfe2c98059 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -31,7 +31,7 @@ struct pgpath {
31 struct priority_group *pg; /* Owning PG */ 31 struct priority_group *pg; /* Owning PG */
32 unsigned fail_count; /* Cumulative failure count */ 32 unsigned fail_count; /* Cumulative failure count */
33 33
34 struct path path; 34 struct dm_path path;
35}; 35};
36 36
37#define path_to_pgpath(__pgp) container_of((__pgp), struct pgpath, path) 37#define path_to_pgpath(__pgp) container_of((__pgp), struct pgpath, path)
@@ -229,7 +229,7 @@ static void __switch_pg(struct multipath *m, struct pgpath *pgpath)
229 229
230static int __choose_path_in_pg(struct multipath *m, struct priority_group *pg) 230static int __choose_path_in_pg(struct multipath *m, struct priority_group *pg)
231{ 231{
232 struct path *path; 232 struct dm_path *path;
233 233
234 path = pg->ps.type->select_path(&pg->ps, &m->repeat_count); 234 path = pg->ps.type->select_path(&pg->ps, &m->repeat_count);
235 if (!path) 235 if (!path)
@@ -957,7 +957,7 @@ static int bypass_pg_num(struct multipath *m, const char *pgstr, int bypassed)
957/* 957/*
958 * pg_init must call this when it has completed its initialisation 958 * pg_init must call this when it has completed its initialisation
959 */ 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{ 961{
962 struct pgpath *pgpath = path_to_pgpath(path); 962 struct pgpath *pgpath = path_to_pgpath(path);
963 struct priority_group *pg = pgpath->pg; 963 struct priority_group *pg = pgpath->pg;
diff --git a/drivers/md/dm-mpath.h b/drivers/md/dm-mpath.h
index 8a4bf2b6d52e..b9cdcbb3ed59 100644
--- a/drivers/md/dm-mpath.h
+++ b/drivers/md/dm-mpath.h
@@ -11,7 +11,7 @@
11 11
12struct dm_dev; 12struct dm_dev;
13 13
14struct path { 14struct dm_path {
15 struct dm_dev *dev; /* Read-only */ 15 struct dm_dev *dev; /* Read-only */
16 unsigned is_active; /* Read-only */ 16 unsigned is_active; /* Read-only */
17 17
@@ -20,6 +20,6 @@ struct path {
20}; 20};
21 21
22/* Callback for hwh_pg_init_fn to use when complete */ 22/* Callback for hwh_pg_init_fn to use when complete */
23void dm_pg_init_complete(struct path *path, unsigned err_flags); 23void dm_pg_init_complete(struct dm_path *path, unsigned err_flags);
24 24
25#endif 25#endif
diff --git a/drivers/md/dm-path-selector.h b/drivers/md/dm-path-selector.h
index 732d06a84f85..27357b85d73d 100644
--- a/drivers/md/dm-path-selector.h
+++ b/drivers/md/dm-path-selector.h
@@ -44,7 +44,7 @@ struct path_selector_type {
44 * Add an opaque path object, along with some selector specific 44 * Add an opaque path object, along with some selector specific
45 * path args (eg, path priority). 45 * path args (eg, path priority).
46 */ 46 */
47 int (*add_path) (struct path_selector *ps, struct path *path, 47 int (*add_path) (struct path_selector *ps, struct dm_path *path,
48 int argc, char **argv, char **error); 48 int argc, char **argv, char **error);
49 49
50 /* 50 /*
@@ -55,27 +55,27 @@ struct path_selector_type {
55 * calling the function again. 0 means don't call it again unless 55 * calling the function again. 0 means don't call it again unless
56 * the path fails. 56 * the path fails.
57 */ 57 */
58 struct path *(*select_path) (struct path_selector *ps, 58 struct dm_path *(*select_path) (struct path_selector *ps,
59 unsigned *repeat_count); 59 unsigned *repeat_count);
60 60
61 /* 61 /*
62 * Notify the selector that a path has failed. 62 * Notify the selector that a path has failed.
63 */ 63 */
64 void (*fail_path) (struct path_selector *ps, struct path *p); 64 void (*fail_path) (struct path_selector *ps, struct dm_path *p);
65 65
66 /* 66 /*
67 * Ask selector to reinstate a path. 67 * Ask selector to reinstate a path.
68 */ 68 */
69 int (*reinstate_path) (struct path_selector *ps, struct path *p); 69 int (*reinstate_path) (struct path_selector *ps, struct dm_path *p);
70 70
71 /* 71 /*
72 * Table content based on parameters added in ps_add_path_fn 72 * Table content based on parameters added in ps_add_path_fn
73 * or path selector status 73 * or path selector status
74 */ 74 */
75 int (*status) (struct path_selector *ps, struct path *path, 75 int (*status) (struct path_selector *ps, struct dm_path *path,
76 status_type_t type, char *result, unsigned int maxlen); 76 status_type_t type, char *result, unsigned int maxlen);
77 77
78 int (*end_io) (struct path_selector *ps, struct path *path); 78 int (*end_io) (struct path_selector *ps, struct dm_path *path);
79}; 79};
80 80
81/* Register a path selector */ 81/* Register a path selector */
diff --git a/drivers/md/dm-round-robin.c b/drivers/md/dm-round-robin.c
index 6f9fcd4db9b5..a348a97b65af 100644
--- a/drivers/md/dm-round-robin.c
+++ b/drivers/md/dm-round-robin.c
@@ -21,7 +21,7 @@
21 *---------------------------------------------------------------*/ 21 *---------------------------------------------------------------*/
22struct path_info { 22struct path_info {
23 struct list_head list; 23 struct list_head list;
24 struct path *path; 24 struct dm_path *path;
25 unsigned repeat_count; 25 unsigned repeat_count;
26}; 26};
27 27
@@ -80,7 +80,7 @@ static void rr_destroy(struct path_selector *ps)
80 ps->context = NULL; 80 ps->context = NULL;
81} 81}
82 82
83static int rr_status(struct path_selector *ps, struct path *path, 83static int rr_status(struct path_selector *ps, struct dm_path *path,
84 status_type_t type, char *result, unsigned int maxlen) 84 status_type_t type, char *result, unsigned int maxlen)
85{ 85{
86 struct path_info *pi; 86 struct path_info *pi;
@@ -106,7 +106,7 @@ static int rr_status(struct path_selector *ps, struct path *path,
106 * Called during initialisation to register each path with an 106 * Called during initialisation to register each path with an
107 * optional repeat_count. 107 * optional repeat_count.
108 */ 108 */
109static int rr_add_path(struct path_selector *ps, struct path *path, 109static int rr_add_path(struct path_selector *ps, struct dm_path *path,
110 int argc, char **argv, char **error) 110 int argc, char **argv, char **error)
111{ 111{
112 struct selector *s = (struct selector *) ps->context; 112 struct selector *s = (struct selector *) ps->context;
@@ -141,7 +141,7 @@ static int rr_add_path(struct path_selector *ps, struct path *path,
141 return 0; 141 return 0;
142} 142}
143 143
144static void rr_fail_path(struct path_selector *ps, struct path *p) 144static void rr_fail_path(struct path_selector *ps, struct dm_path *p)
145{ 145{
146 struct selector *s = (struct selector *) ps->context; 146 struct selector *s = (struct selector *) ps->context;
147 struct path_info *pi = p->pscontext; 147 struct path_info *pi = p->pscontext;
@@ -149,7 +149,7 @@ static void rr_fail_path(struct path_selector *ps, struct path *p)
149 list_move(&pi->list, &s->invalid_paths); 149 list_move(&pi->list, &s->invalid_paths);
150} 150}
151 151
152static int rr_reinstate_path(struct path_selector *ps, struct path *p) 152static int rr_reinstate_path(struct path_selector *ps, struct dm_path *p)
153{ 153{
154 struct selector *s = (struct selector *) ps->context; 154 struct selector *s = (struct selector *) ps->context;
155 struct path_info *pi = p->pscontext; 155 struct path_info *pi = p->pscontext;
@@ -159,7 +159,7 @@ static int rr_reinstate_path(struct path_selector *ps, struct path *p)
159 return 0; 159 return 0;
160} 160}
161 161
162static struct path *rr_select_path(struct path_selector *ps, 162static struct dm_path *rr_select_path(struct path_selector *ps,
163 unsigned *repeat_count) 163 unsigned *repeat_count)
164{ 164{
165 struct selector *s = (struct selector *) ps->context; 165 struct selector *s = (struct selector *) ps->context;