All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] md/raid5: Reduce one write-operation when handle badsector
@ 2013-02-28  7:51 majianpeng
  2013-03-04  1:43 ` NeilBrown
  0 siblings, 1 reply; 5+ messages in thread
From: majianpeng @ 2013-02-28  7:51 UTC (permalink / raw)
  To: NeilBrown; +Cc: linux-raid

For badsector,it took two steps:rewrite and reread.So for
write-operation,it make no sense to rewrite after write-operation.

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
---
 drivers/md/raid5.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 19d77a0..59c0569 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1921,8 +1921,10 @@ static void raid5_end_write_request(struct bio *bi, int error)
 					&rdev->mddev->recovery);
 		} else if (is_badblock(rdev, sh->sector,
 				       STRIPE_SECTORS,
-				       &first_bad, &bad_sectors))
+				       &first_bad, &bad_sectors)) {
 			set_bit(R5_MadeGood, &sh->dev[i].flags);
+			set_bit(R5_ReWrite, &sh->dev[i].flags);
+		}
 	}
 	rdev_dec_pending(rdev, conf->mddev);
 
-- 
1.7.9.5

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

end of thread, other threads:[~2013-03-04  2:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-28  7:51 [PATCH 1/4] md/raid5: Reduce one write-operation when handle badsector majianpeng
2013-03-04  1:43 ` NeilBrown
2013-03-04  1:52   ` majianpeng
2013-03-04  2:25     ` NeilBrown
2013-03-04  2:37       ` majianpeng

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.