Commit aff89d6c authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] md: fix two little bugs in raid10

These can cause resync to spin when there is a faulty drive.
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 d42e0954
...@@ -1496,6 +1496,7 @@ static int sync_request(mddev_t *mddev, sector_t sector_nr, int go_faster) ...@@ -1496,6 +1496,7 @@ static int sync_request(mddev_t *mddev, sector_t sector_nr, int go_faster)
rdev_dec_pending(conf->mirrors[d].rdev, mddev); rdev_dec_pending(conf->mirrors[d].rdev, mddev);
} }
put_buf(r10_bio); put_buf(r10_bio);
biolist = NULL;
goto giveup; goto giveup;
} }
} }
...@@ -1557,7 +1558,7 @@ static int sync_request(mddev_t *mddev, sector_t sector_nr, int go_faster) ...@@ -1557,7 +1558,7 @@ static int sync_request(mddev_t *mddev, sector_t sector_nr, int go_faster)
} }
} }
return nr_sectors; return sectors_skipped + nr_sectors;
giveup: giveup:
/* There is nowhere to write, so all non-sync /* There is nowhere to write, so all non-sync
* drives must be failed, so try the next chunk... * drives must be failed, so try the next chunk...
......
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