Skip to content

Commit

Permalink
md/raid5: fix a hang on device failure.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
neilbrown committed Aug 31, 2011
1 parent 7da64a0 commit 43220aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -3336,7 +3336,7 @@ static void handle_stripe(struct stripe_head *sh)

finish:
/* wait for this device to become unblocked */
if (unlikely(s.blocked_rdev))
if (conf->mddev->external && unlikely(s.blocked_rdev))
md_wait_for_blocked_rdev(s.blocked_rdev, conf->mddev);

if (s.handle_bad_blocks)
Expand Down

0 comments on commit 43220aa

Please sign in to comment.