path: root/sys/contrib/openzfs/module
diff options
authorMartin Matuska <mm@FreeBSD.org>2021-02-15 07:40:27 +0000
committerMartin Matuska <mm@FreeBSD.org>2021-02-15 09:50:10 +0000
commitf15e18a642cb3f7ebc747f8e9cdf11274140107d (patch)
tree35ec3c37eb187fe6dff0a9e2dfae2636b36b7c49 /sys/contrib/openzfs/module
parentbe2003ccfa1b12f372fa1329c38c29fe035f232f (diff)
zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks
From openzfs-master 62d4287f2 commit message: When scrubbing, (non-sequential) resilvering, or correcting a checksum error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by overwriting it. For example, if P disks are silently corrupted (P being the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub` should detect and heal all the bad state on these disks, including parity. This way if there is a subsequent failure we are fully protected. With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity sector, and also damage (silent or known) to a data sector. In this case the parity should be healed but it is not. Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e Patch Author: Matthew Ahrens <matthew.ahrens@delphix.com> MFC after: 3 days Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D28681
Diffstat (limited to 'sys/contrib/openzfs/module')
1 files changed, 0 insertions, 10 deletions
diff --git a/sys/contrib/openzfs/module/zfs/vdev_raidz.c b/sys/contrib/openzfs/module/zfs/vdev_raidz.c
index 989b90dc2635..5b152f38bd63 100644
--- a/sys/contrib/openzfs/module/zfs/vdev_raidz.c
+++ b/sys/contrib/openzfs/module/zfs/vdev_raidz.c
@@ -1922,16 +1922,6 @@ raidz_parity_verify(zio_t *zio, raidz_row_t *rr)
if (checksum == ZIO_CHECKSUM_NOPARITY)
return (ret);
- /*
- * All data columns must have been successfully read in order
- * to use them to generate parity columns for comparison.
- */
- for (c = rr->rr_firstdatacol; c < rr->rr_cols; c++) {
- rc = &rr->rr_col[c];
- if (!rc->rc_tried || rc->rc_error != 0)
- return (ret);
- }
for (c = 0; c < rr->rr_firstdatacol; c++) {
rc = &rr->rr_col[c];
if (!rc->rc_tried || rc->rc_error != 0)