Commit 364e2a1b authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] md: fix careless bug in raid10

raid10 performs resync by reading all blocks, comparing to look for The
requires re-tasking a bio that was used to read, so that it can be re-used
for write.  So a number of fields need to be reset.

The bi_bdev field was not being reset.  However when using on a partition
of a device, it gets changed by generic_make_request.

This patch simply resets bi_bdev to the correct value.
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a3e47bc9
......@@ -1150,6 +1150,7 @@ static void sync_request_write(mddev_t *mddev, r10bio_t *r10_bio)
md_sync_acct(conf->mirrors[d].rdev->bdev, tbio->bi_size >> 9);
tbio->bi_sector += conf->mirrors[d].rdev->data_offset;
tbio->bi_bdev = conf->mirrors[d].rdev->bdev;
generic_make_request(tbio);
}
......
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