Hi again, This patch just places the other __choose_path call under the path_lock incase a path is failed and multipath_map is called at the same time. Also built against udm3. Mike Christie mikenc@xxxxxxxxxx
--- linux-2.6.0-test10/drivers/md/dm-mpath.c 2003-12-23 01:52:51.112246722 -0800 +++ linux-2.6.0-test10-udm3/drivers/md/dm-mpath.c 2003-12-23 01:50:58.280778823 -0800 @@ -647,15 +647,10 @@ static struct path *__find_path(struct m return NULL; } -static int __resubmit_io(struct multipath *m, struct bio *bio) +static void __resubmit_io(struct multipath *m, struct bio *bio) { - int r; unsigned long flags; - r = __choose_path(m); - if (r) - return r; - /* remap */ bio->bi_bdev = m->current_path->dev->bdev; @@ -666,7 +661,6 @@ static int __resubmit_io(struct multipat spin_unlock_irqrestore(&m->failed_lock, flags); dm_daemon_wake(&_kmpathd); - return 1; /* io not complete */ } static int multipath_end_io(struct dm_target *ti, struct bio *bio, @@ -681,9 +675,14 @@ static int multipath_end_io(struct dm_ta spin_lock(&m->path_lock); path = __find_path(m, bio->bi_bdev); __fail_path(path); + r = __choose_path(m); spin_unlock(&m->path_lock); - r = __resubmit_io(m, bio); + if (!r) { + __resubmit_io(m, bio); + /* io not complete */ + r = 1; + } } return r;