]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid6: Set R5_ReadError when there is read failure on parity disk
authorXiao Ni <xni@redhat.com>
Mon, 8 Jul 2019 02:14:32 +0000 (10:14 +0800)
committerSong Liu <songliubraving@fb.com>
Wed, 7 Aug 2019 17:25:02 +0000 (10:25 -0700)
commit62af11480b0d268a6b4a92b29d5b536a5db773bc
treef146c340dd0bb7bfa465ebaede8ef9d3b1248cf7
parent27e5a7de0fe6cccace8fd5826dfad9ae7b892d14
md/raid6: Set R5_ReadError when there is read failure on parity disk

683ecb8610fd ("md/raid6: Fix anomily when recovering a single device in
RAID6.") avoids rereading P when it can be computed from other members.
However, this misses the chance to re-write the right data to P. This
patch sets R5_ReadError if the re-read fails.

Also, when re-read is skipped, we also missed the chance to reset
rdev->read_errors to 0. It can fail the disk when there are many read
errors on P member disk (other disks don't have read error)

V2: upper layer read request don't read parity/Q data. So there is no
need to consider such situation.

This is Reported-by: kbuild test robot <lkp@intel.com>

Fixes: 683ecb8610fd ("md/raid6: Fix anomily when recovering a single device in RAID6.")
Cc: <stable@vger.kernel.org> #4.4+
Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
drivers/md/raid5.c