aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-08-30 22:49:14 -0400
committerNeilBrown <neilb@suse.de>2011-08-30 22:49:14 -0400
commit43220aa0f22cd3ce5b30246d50ccd696d119edea (patch)
tree2738ff3d5acfbe899f30c4991175f945211e941d
parent7da64a0abc3b2c6cbd3521672e9bb74dd560bb89 (diff)
md/raid5: fix a hang on device failure.
Waiting for a 'blocked' rdev to become unblocked in the raid5d thread cannot work with internal metadata as it is the raid5d thread which will clear the blocked flag. This wasn't a problem in 3.0 and earlier as we only set the blocked flag when external metadata was used then. However we now set it always, so we need to be more careful. Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--drivers/md/raid5.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index dbae459fb02d..43709fa6b6df 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3336,7 +3336,7 @@ static void handle_stripe(struct stripe_head *sh)
3336 3336
3337finish: 3337finish:
3338 /* wait for this device to become unblocked */ 3338 /* wait for this device to become unblocked */
3339 if (unlikely(s.blocked_rdev)) 3339 if (conf->mddev->external && unlikely(s.blocked_rdev))
3340 md_wait_for_blocked_rdev(s.blocked_rdev, conf->mddev); 3340 md_wait_for_blocked_rdev(s.blocked_rdev, conf->mddev);
3341 3341
3342 if (s.handle_bad_blocks) 3342 if (s.handle_bad_blocks)