Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b76b4715 authored by Nigel Croxon's avatar Nigel Croxon Committed by Song Liu
Browse files

raid5: don't increment read_errors on EILSEQ return



While MD continues to count read errors returned by the lower layer.
If those errors are -EILSEQ, instead of -EIO, it should NOT increase
the read_errors count.

When RAID6 is set up on dm-integrity target that detects massive
corruption, the leg will be ejected from the array.  Even if the
issue is correctable with a sector re-write and the array has
necessary redundancy to correct it.

The leg is ejected because it runs up the rdev->read_errors beyond
conf->max_nr_stripes.  The return status in dm-drypt when there is
a data integrity error is -EILSEQ (BLK_STS_PROTECTION).

Signed-off-by: default avatarNigel Croxon <ncroxon@redhat.com>
Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
parent 21fa1004
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2526,6 +2526,7 @@ static void raid5_end_read_request(struct bio * bi)
		int set_bad = 0;

		clear_bit(R5_UPTODATE, &sh->dev[i].flags);
		if (!(bi->bi_status == BLK_STS_PROTECTION))
			atomic_inc(&rdev->read_errors);
		if (test_bit(R5_ReadRepl, &sh->dev[i].flags))
			pr_warn_ratelimited(