aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2011-07-26 21:00:36 -0400
committerNeilBrown <neilb@suse.de>2011-07-26 21:00:36 -0400
commitddd5115fe5594f5aae3c7f0008a5327bb1d19397 (patch)
treea3bfeaea386bbecb4bc4cd56ff3139c5d9975981 /drivers/md/raid5.c
parent9d3d80113df824a266c5db3fac357a036ebc0b62 (diff)
md/raid5: move rdev->corrected_errors counting
Read errors are considered to corrected if write-back and re-read cycle is finished without further problems. Thus moving the rdev-> corrected_errors counting after the re-reading looks more reasonable IMHO. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 0cd591472e1f..a81eca6434dd 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -547,10 +547,6 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
547 bi->bi_io_vec[0].bv_offset = 0; 547 bi->bi_io_vec[0].bv_offset = 0;
548 bi->bi_size = STRIPE_SIZE; 548 bi->bi_size = STRIPE_SIZE;
549 bi->bi_next = NULL; 549 bi->bi_next = NULL;
550 if ((rw & WRITE) &&
551 test_bit(R5_ReWrite, &sh->dev[i].flags))
552 atomic_add(STRIPE_SECTORS,
553 &rdev->corrected_errors);
554 generic_make_request(bi); 550 generic_make_request(bi);
555 } else { 551 } else {
556 if (rw & WRITE) 552 if (rw & WRITE)
@@ -1590,6 +1586,7 @@ static void raid5_end_read_request(struct bio * bi, int error)
1590 (unsigned long long)(sh->sector 1586 (unsigned long long)(sh->sector
1591 + rdev->data_offset), 1587 + rdev->data_offset),
1592 bdevname(rdev->bdev, b)); 1588 bdevname(rdev->bdev, b));
1589 atomic_add(STRIPE_SECTORS, &rdev->corrected_errors);
1593 clear_bit(R5_ReadError, &sh->dev[i].flags); 1590 clear_bit(R5_ReadError, &sh->dev[i].flags);
1594 clear_bit(R5_ReWrite, &sh->dev[i].flags); 1591 clear_bit(R5_ReWrite, &sh->dev[i].flags);
1595 } 1592 }