Commit 9c66cd06 authored by Heiko Carstens's avatar Heiko Carstens Committed by Linus Torvalds

[PATCH] md multipathing fixes

I tried to get multipathing failover running and failed. It seems to be
that there are two bugs in multipath.c :

- If a path/request fails mp_bh->path doesn't get updated to the new
  path.  Thus multipath_end_request will access a NULL pointer if a
  redirected request returns.

- After fixing this I experienced several other errors.  First of all in
  bio->bi_flags the BIO_UPTODATE flag is not set when redirecting a
  request.

  Causing the md driver to think that every redirected request failed
  when it returns.  Since that alone didn't fix the problems, I simply
  copied the master_bio again and it looks like everything seems to work.

Cc: <neilb@cse.unsw.edu.au>
Cc: Jens Axboe <axboe@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ce1d89ca
...@@ -382,7 +382,11 @@ static void multipathd (mddev_t *mddev) ...@@ -382,7 +382,11 @@ static void multipathd (mddev_t *mddev)
" to another IO path\n", " to another IO path\n",
bdevname(bio->bi_bdev,b), bdevname(bio->bi_bdev,b),
(unsigned long long)bio->bi_sector); (unsigned long long)bio->bi_sector);
*bio = *(mp_bh->master_bio);
bio->bi_bdev = conf->multipaths[mp_bh->path].rdev->bdev; bio->bi_bdev = conf->multipaths[mp_bh->path].rdev->bdev;
bio->bi_rw |= (1 << BIO_RW_FAILFAST);
bio->bi_end_io = multipath_end_request;
bio->bi_private = mp_bh;
generic_make_request(bio); generic_make_request(bio);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment