提交 43220aa0 编写于 作者: N NeilBrown

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: NNeilBrown <neilb@suse.de>
上级 7da64a0a
...@@ -3336,7 +3336,7 @@ static void handle_stripe(struct stripe_head *sh) ...@@ -3336,7 +3336,7 @@ static void handle_stripe(struct stripe_head *sh)
finish: finish:
/* wait for this device to become unblocked */ /* 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); md_wait_for_blocked_rdev(s.blocked_rdev, conf->mddev);
if (s.handle_bad_blocks) if (s.handle_bad_blocks)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册