Deleted Added
full compact
vdev_raidz.c (209095) vdev_raidz.c (209962)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 673 unchanged lines hidden (view full) ---

682 rm->rm_missingdata++;
683 else
684 rm->rm_missingparity++;
685 rc->rc_error = ENXIO;
686 rc->rc_tried = 1; /* don't even try */
687 rc->rc_skipped = 1;
688 continue;
689 }
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 673 unchanged lines hidden (view full) ---

682 rm->rm_missingdata++;
683 else
684 rm->rm_missingparity++;
685 rc->rc_error = ENXIO;
686 rc->rc_tried = 1; /* don't even try */
687 rc->rc_skipped = 1;
688 continue;
689 }
690 if (vdev_dtl_contains(&cvd->vdev_dtl_map, bp->blk_birth, 1)) {
690 if (vdev_dtl_contains(cvd, DTL_MISSING, bp->blk_birth, 1)) {
691 if (c >= rm->rm_firstdatacol)
692 rm->rm_missingdata++;
693 else
694 rm->rm_missingparity++;
695 rc->rc_error = ESTALE;
696 rc->rc_skipped = 1;
697 continue;
698 }

--- 461 unchanged lines hidden (view full) ---

1160 zio->io_spa, vd->vdev_child[rc->rc_devidx], zio,
1161 rc->rc_offset, rc->rc_size);
1162 }
1163 }
1164
1165done:
1166 zio_checksum_verified(zio);
1167
691 if (c >= rm->rm_firstdatacol)
692 rm->rm_missingdata++;
693 else
694 rm->rm_missingparity++;
695 rc->rc_error = ESTALE;
696 rc->rc_skipped = 1;
697 continue;
698 }

--- 461 unchanged lines hidden (view full) ---

1160 zio->io_spa, vd->vdev_child[rc->rc_devidx], zio,
1161 rc->rc_offset, rc->rc_size);
1162 }
1163 }
1164
1165done:
1166 zio_checksum_verified(zio);
1167
1168 if (zio->io_error == 0 && (spa_mode & FWRITE) &&
1168 if (zio->io_error == 0 && spa_writeable(zio->io_spa) &&
1169 (unexpected_errors || (zio->io_flags & ZIO_FLAG_RESILVER))) {
1170 /*
1171 * Use the good data we have in hand to repair damaged children.
1172 */
1173 for (c = 0; c < rm->rm_cols; c++) {
1174 rc = &rm->rm_col[c];
1175 cvd = vd->vdev_child[rc->rc_devidx];
1176
1177 if (rc->rc_error == 0)
1178 continue;
1179
1180 zio_nowait(zio_vdev_child_io(zio, NULL, cvd,
1181 rc->rc_offset, rc->rc_data, rc->rc_size,
1182 ZIO_TYPE_WRITE, zio->io_priority,
1169 (unexpected_errors || (zio->io_flags & ZIO_FLAG_RESILVER))) {
1170 /*
1171 * Use the good data we have in hand to repair damaged children.
1172 */
1173 for (c = 0; c < rm->rm_cols; c++) {
1174 rc = &rm->rm_col[c];
1175 cvd = vd->vdev_child[rc->rc_devidx];
1176
1177 if (rc->rc_error == 0)
1178 continue;
1179
1180 zio_nowait(zio_vdev_child_io(zio, NULL, cvd,
1181 rc->rc_offset, rc->rc_data, rc->rc_size,
1182 ZIO_TYPE_WRITE, zio->io_priority,
1183 ZIO_FLAG_IO_REPAIR, NULL, NULL));
1183 ZIO_FLAG_IO_REPAIR | (unexpected_errors ?
1184 ZIO_FLAG_SELF_HEAL : 0), NULL, NULL));
1184 }
1185 }
1186}
1187
1188static void
1189vdev_raidz_state_change(vdev_t *vd, int faulted, int degraded)
1190{
1191 if (faulted > vd->vdev_nparity)

--- 18 unchanged lines hidden ---
1185 }
1186 }
1187}
1188
1189static void
1190vdev_raidz_state_change(vdev_t *vd, int faulted, int degraded)
1191{
1192 if (faulted > vd->vdev_nparity)

--- 18 unchanged lines hidden ---