summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-01-20 03:12:09 -0800
committerLinus Torvalds <torvalds@home.osdl.org>2004-01-20 03:12:09 -0800
commit5a6995348338db8edb2a8ecd804e3eaced94e855 (patch)
treeb637151a5843d097fa912c6320a8463571be34cb
parent5edef83d7b0863390315df4d4e0cf9a3d805c844 (diff)
[PATCH] md: Make sure an interrupted resync doesn't seem to have completed.
From: NeilBrown <neilb@cse.unsw.edu.au> If the raid1 or raid5 thread gets to run md_check_recovery after the recovery thread has been interupted, but before do_md_stop completes, a spare drive can be incorporated into an array befure it is up-to-date. This patch corrects the relevant test.
-rw-r--r--drivers/md/md.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index ba0562e6e2e9..95c8f87ba83c 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3383,7 +3383,8 @@ void md_check_recovery(mddev_t *mddev)
/* resync has finished, collect result */
md_unregister_thread(mddev->sync_thread);
mddev->sync_thread = NULL;
- if (!test_bit(MD_RECOVERY_ERR, &mddev->recovery)) {
+ if (!test_bit(MD_RECOVERY_ERR, &mddev->recovery) &&
+ !test_bit(MD_RECOVERY_INTR, &mddev->recovery)) {
/* success...*/
/* activate any spares */
mddev->pers->spare_active(mddev);