From: Alex Tomas <alexey@technomagesinc.com>
To: neilb@unsw.edu.au
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH-2.4] raid5 oopses on 2nd failed device
Date: Tue, 15 Apr 2003 14:42:29 +0400 [thread overview]
Message-ID: <m3adest52i.fsf@tmi.comex.ru> (raw)
hi!
it looks like raid5 is buggy. as 2nd device is failed, I got oops.
it's BUG at raid5.c:212. this is because sh->written[N] isn't NULL.
raid5d thread try to handle this stripe, but following condition
skip handling:
/* might be able to return some write requests if the parity block
* is safe, or on a failed drive
*/
bh = sh->bh_cache[sh->pd_idx];
if ( written &&
( (conf->disks[sh->pd_idx].operational && !buffer_locked(bh) && buffer_uptodate(bh))
|| (failed == 1 && failed_num == sh->pd_idx))
) {
I suggest to fail requests which can't be returned as successful.
with best regards
diff -puNr linux/drivers/md/raid5.c edited/drivers/md/raid5.c
--- linux/drivers/md/raid5.c Wed Jan 15 20:18:37 2003
+++ edited/drivers/md/raid5.c Tue Apr 15 12:59:24 2003
@@ -938,7 +938,19 @@ static void handle_stripe(struct stripe_
}
}
}
-
+
+ /* if already written requests can't be returned as successful fail them */
+ if (failed > 1 && written) {
+ for (i=disks; i--; ) {
+ if (sh->bh_written[i]) written--;
+ while ((bh = sh->bh_written[i])) {
+ sh->bh_written[i] = bh->b_reqnext;
+ bh->b_reqnext = return_fail;
+ return_fail = bh;
+ }
+ }
+ }
+
/* Now we might consider reading some blocks, either to check/generate
* parity, or to satisfy requests
*/
reply other threads:[~2003-04-15 10:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=m3adest52i.fsf@tmi.comex.ru \
--to=alexey@technomagesinc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@unsw.edu.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox