diff options
Diffstat (limited to 'drivers/md/dm-mpath.c')
-rw-r--r-- | drivers/md/dm-mpath.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index de54b39e6ffe..c0950a0b5312 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -83,7 +83,7 @@ struct multipath { | |||
83 | struct work_struct trigger_event; | 83 | struct work_struct trigger_event; |
84 | 84 | ||
85 | /* | 85 | /* |
86 | * We must use a mempool of mpath_io structs so that we | 86 | * We must use a mempool of dm_mpath_io structs so that we |
87 | * can resubmit bios on error. | 87 | * can resubmit bios on error. |
88 | */ | 88 | */ |
89 | mempool_t *mpio_pool; | 89 | mempool_t *mpio_pool; |
@@ -92,7 +92,7 @@ struct multipath { | |||
92 | /* | 92 | /* |
93 | * Context information attached to each bio we process. | 93 | * Context information attached to each bio we process. |
94 | */ | 94 | */ |
95 | struct mpath_io { | 95 | struct dm_mpath_io { |
96 | struct pgpath *pgpath; | 96 | struct pgpath *pgpath; |
97 | struct dm_bio_details details; | 97 | struct dm_bio_details details; |
98 | }; | 98 | }; |
@@ -122,7 +122,7 @@ static struct pgpath *alloc_pgpath(void) | |||
122 | return pgpath; | 122 | return pgpath; |
123 | } | 123 | } |
124 | 124 | ||
125 | static inline void free_pgpath(struct pgpath *pgpath) | 125 | static void free_pgpath(struct pgpath *pgpath) |
126 | { | 126 | { |
127 | kfree(pgpath); | 127 | kfree(pgpath); |
128 | } | 128 | } |
@@ -299,8 +299,8 @@ static int __must_push_back(struct multipath *m) | |||
299 | dm_noflush_suspending(m->ti)); | 299 | dm_noflush_suspending(m->ti)); |
300 | } | 300 | } |
301 | 301 | ||
302 | static int map_io(struct multipath *m, struct bio *bio, struct mpath_io *mpio, | 302 | static int map_io(struct multipath *m, struct bio *bio, |
303 | unsigned was_queued) | 303 | struct dm_mpath_io *mpio, unsigned was_queued) |
304 | { | 304 | { |
305 | int r = DM_MAPIO_REMAPPED; | 305 | int r = DM_MAPIO_REMAPPED; |
306 | unsigned long flags; | 306 | unsigned long flags; |
@@ -374,7 +374,7 @@ static void dispatch_queued_ios(struct multipath *m) | |||
374 | int r; | 374 | int r; |
375 | unsigned long flags; | 375 | unsigned long flags; |
376 | struct bio *bio = NULL, *next; | 376 | struct bio *bio = NULL, *next; |
377 | struct mpath_io *mpio; | 377 | struct dm_mpath_io *mpio; |
378 | union map_info *info; | 378 | union map_info *info; |
379 | 379 | ||
380 | spin_lock_irqsave(&m->lock, flags); | 380 | spin_lock_irqsave(&m->lock, flags); |
@@ -795,7 +795,7 @@ static int multipath_map(struct dm_target *ti, struct bio *bio, | |||
795 | union map_info *map_context) | 795 | union map_info *map_context) |
796 | { | 796 | { |
797 | int r; | 797 | int r; |
798 | struct mpath_io *mpio; | 798 | struct dm_mpath_io *mpio; |
799 | struct multipath *m = (struct multipath *) ti->private; | 799 | struct multipath *m = (struct multipath *) ti->private; |
800 | 800 | ||
801 | if (bio_barrier(bio)) | 801 | if (bio_barrier(bio)) |
@@ -1014,7 +1014,7 @@ void dm_pg_init_complete(struct dm_path *path, unsigned err_flags) | |||
1014 | * end_io handling | 1014 | * end_io handling |
1015 | */ | 1015 | */ |
1016 | static int do_end_io(struct multipath *m, struct bio *bio, | 1016 | static int do_end_io(struct multipath *m, struct bio *bio, |
1017 | int error, struct mpath_io *mpio) | 1017 | int error, struct dm_mpath_io *mpio) |
1018 | { | 1018 | { |
1019 | struct hw_handler *hwh = &m->hw_handler; | 1019 | struct hw_handler *hwh = &m->hw_handler; |
1020 | unsigned err_flags = MP_FAIL_PATH; /* Default behavior */ | 1020 | unsigned err_flags = MP_FAIL_PATH; /* Default behavior */ |
@@ -1075,8 +1075,8 @@ static int do_end_io(struct multipath *m, struct bio *bio, | |||
1075 | static int multipath_end_io(struct dm_target *ti, struct bio *bio, | 1075 | static int multipath_end_io(struct dm_target *ti, struct bio *bio, |
1076 | int error, union map_info *map_context) | 1076 | int error, union map_info *map_context) |
1077 | { | 1077 | { |
1078 | struct multipath *m = (struct multipath *) ti->private; | 1078 | struct multipath *m = ti->private; |
1079 | struct mpath_io *mpio = (struct mpath_io *) map_context->ptr; | 1079 | struct dm_mpath_io *mpio = map_context->ptr; |
1080 | struct pgpath *pgpath = mpio->pgpath; | 1080 | struct pgpath *pgpath = mpio->pgpath; |
1081 | struct path_selector *ps; | 1081 | struct path_selector *ps; |
1082 | int r; | 1082 | int r; |
@@ -1346,8 +1346,7 @@ static int __init dm_multipath_init(void) | |||
1346 | int r; | 1346 | int r; |
1347 | 1347 | ||
1348 | /* allocate a slab for the dm_ios */ | 1348 | /* allocate a slab for the dm_ios */ |
1349 | _mpio_cache = kmem_cache_create("dm_mpath", sizeof(struct mpath_io), | 1349 | _mpio_cache = KMEM_CACHE(dm_mpath_io, 0); |
1350 | 0, 0, NULL, NULL); | ||
1351 | if (!_mpio_cache) | 1350 | if (!_mpio_cache) |
1352 | return -ENOMEM; | 1351 | return -ENOMEM; |
1353 | 1352 | ||