From: majianpeng <majianpeng@gmail.com>
To: Neil Brown <neilb@suse.de>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: [PATCH] md/raid5:Add "BlockedBadBlocks" flag when waitting rdev to be unlocked.
Date: Mon, 18 Jun 2012 11:13:48 +0800 [thread overview]
Message-ID: <201206181113442039690@gmail.com> (raw)
If rdev became blocked because the unack badblocks, it did not exec
md_wait_for_blocked_rdev in handle_stripe().So the rdev->nr_pending did
not decrease.So rdev did not remove because the wrong nr_pending.
Signed-off-by: majianpeng <majianpeng@gmail.com>
---
drivers/md/raid5.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index d267672..ed63261 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3582,7 +3582,8 @@ static void handle_stripe(struct stripe_head *sh)
finish:
/* wait for this device to become unblocked */
- if (conf->mddev->external && unlikely(s.blocked_rdev))
+ if (unlikely(s.blocked_rdev) && (conf->mddev->external ||
+ test_bit(BlockedBadBlocks, &(s.blocked_rdev->flags))))
md_wait_for_blocked_rdev(s.blocked_rdev, conf->mddev);
if (s.handle_bad_blocks)
--
1.7.5.4
next reply other threads:[~2012-06-18 3:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-18 3:13 majianpeng [this message]
2012-06-27 3:45 ` [PATCH] md/raid5:Add "BlockedBadBlocks" flag when waitting rdev to be unlocked NeilBrown
2012-06-27 3:55 ` NeilBrown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201206181113442039690@gmail.com \
--to=majianpeng@gmail.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.