linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG / PATCH] raid1: set BIO_UPTODATE after read error
@ 2004-09-10 20:22 Paul Clements
  2004-09-13  5:32 ` Neil Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Clements @ 2004-09-10 20:22 UTC (permalink / raw)
  To: neilb; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 646 bytes --]

Neil,

unless you've already done so, I believe there is a little fix needed in 
the raid1 read reschedule code. As the code currently works, a read that 
is retried will continue to fail and cause raid1 to go into an infinite 
retry loop:

Sep 10 14:42:04 fiji kernel: raid1: sdb1: redirecting sector 2 to 
another mirror
Sep 10 14:42:04 fiji kernel: raid1: sdb1: rescheduling sector 2
Sep 10 14:42:04 fiji kernel: raid1: sdb1: redirecting sector 2 to 
another mirror
Sep 10 14:42:04 fiji kernel: raid1: sdb1: rescheduling sector 2
Sep 10 14:42:04 fiji kernel: raid1: sdb1: redirecting sector 2 to 
another mirror

Patch attached.

Thanks,
Paul

[-- Attachment #2: md_raid1_bio_uptodate_fix.diff --]
[-- Type: text/plain, Size: 439 bytes --]

--- linux/drivers/md/raid1.c.orig	2004-09-10 13:49:58.000000000 -0400
+++ linux/drivers/md/raid1.c	2004-09-10 15:46:47.000000000 -0400
@@ -970,6 +970,8 @@ static void raid1d(mddev_t *mddev)
 				bio->bi_bdev = rdev->bdev;
 				bio->bi_sector = r1_bio->sector + rdev->data_offset;
 				bio->bi_rw = READ;
+				/* clear any previous error */
+				set_bit(BIO_UPTODATE, &bio->bi_flags);
 				unplug = 1;
 				generic_make_request(bio);
 			}

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-09-22  0:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-10 20:22 [BUG / PATCH] raid1: set BIO_UPTODATE after read error Paul Clements
2004-09-13  5:32 ` Neil Brown
2004-09-15 17:34   ` Paul Clements
2004-09-16 10:50     ` Write and verify correct data to read-failed sectors before degrading array? Tim Small
2004-09-17  0:39       ` Neil Brown
2004-09-17  1:41         ` Sebastian Sobolewski
2004-09-17  2:00           ` Neil Brown
2004-09-17  2:13             ` Sebastian Sobolewski
2004-09-22  0:06               ` [PATCH] " Sebastian Sobolewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).