aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-mpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-mpath.c')
-rw-r--r--drivers/md/dm-mpath.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index dda4109292bc..d325edcbb3f5 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -285,7 +285,7 @@ failed:
285static int map_io(struct multipath *m, struct bio *bio, struct mpath_io *mpio, 285static int map_io(struct multipath *m, struct bio *bio, struct mpath_io *mpio,
286 unsigned was_queued) 286 unsigned was_queued)
287{ 287{
288 int r = 1; 288 int r = DM_MAPIO_REMAPPED;
289 unsigned long flags; 289 unsigned long flags;
290 struct pgpath *pgpath; 290 struct pgpath *pgpath;
291 291
@@ -310,7 +310,7 @@ static int map_io(struct multipath *m, struct bio *bio, struct mpath_io *mpio,
310 !m->queue_io) 310 !m->queue_io)
311 queue_work(kmultipathd, &m->process_queued_ios); 311 queue_work(kmultipathd, &m->process_queued_ios);
312 pgpath = NULL; 312 pgpath = NULL;
313 r = 0; 313 r = DM_MAPIO_SUBMITTED;
314 } else if (!pgpath) 314 } else if (!pgpath)
315 r = -EIO; /* Failed */ 315 r = -EIO; /* Failed */
316 else 316 else
@@ -372,7 +372,7 @@ static void dispatch_queued_ios(struct multipath *m)
372 r = map_io(m, bio, mpio, 1); 372 r = map_io(m, bio, mpio, 1);
373 if (r < 0) 373 if (r < 0)
374 bio_endio(bio, bio->bi_size, r); 374 bio_endio(bio, bio->bi_size, r);
375 else if (r == 1) 375 else if (r == DM_MAPIO_REMAPPED)
376 generic_make_request(bio); 376 generic_make_request(bio);
377 377
378 bio = next; 378 bio = next;
@@ -1042,7 +1042,7 @@ static int do_end_io(struct multipath *m, struct bio *bio,
1042 queue_work(kmultipathd, &m->process_queued_ios); 1042 queue_work(kmultipathd, &m->process_queued_ios);
1043 spin_unlock_irqrestore(&m->lock, flags); 1043 spin_unlock_irqrestore(&m->lock, flags);
1044 1044
1045 return 1; /* io not complete */ 1045 return DM_ENDIO_INCOMPLETE; /* io not complete */
1046} 1046}
1047 1047
1048static int multipath_end_io(struct dm_target *ti, struct bio *bio, 1048static int multipath_end_io(struct dm_target *ti, struct bio *bio,
@@ -1060,7 +1060,7 @@ static int multipath_end_io(struct dm_target *ti, struct bio *bio,
1060 if (ps->type->end_io) 1060 if (ps->type->end_io)
1061 ps->type->end_io(ps, &pgpath->path); 1061 ps->type->end_io(ps, &pgpath->path);
1062 } 1062 }
1063 if (r <= 0) 1063 if (r != DM_ENDIO_INCOMPLETE)
1064 mempool_free(mpio, m->mpio_pool); 1064 mempool_free(mpio, m->mpio_pool);
1065 1065
1066 return r; 1066 return r;