* Return the number of reads issued. */
| 2416 | * Return the number of reads issued. |
| 2417 | */ |
| 2418 | static int |
| 2419 | vdev_raidz_read_all(zio_t *zio, raidz_row_t *rr) |
| 2420 | { |
| 2421 | vdev_t *vd = zio->io_vd; |
| 2422 | int nread = 0; |
| 2423 | |
| 2424 | rr->rr_missingdata = 0; |
| 2425 | rr->rr_missingparity = 0; |
| 2426 | |
| 2427 | /* |
| 2428 | * If this rows contains empty sectors which are not required |
| 2429 | * for a normal read then allocate an ABD for them now so they |
| 2430 | * may be read, verified, and any needed repairs performed. |
| 2431 | */ |
| 2432 | if (rr->rr_nempty && rr->rr_abd_empty == NULL) |
| 2433 | vdev_draid_map_alloc_empty(zio, rr); |
| 2434 | |
| 2435 | for (int c = 0; c < rr->rr_cols; c++) { |
| 2436 | raidz_col_t *rc = &rr->rr_col[c]; |
| 2437 | if (rc->rc_tried || rc->rc_size == 0) |
| 2438 | continue; |
| 2439 | |
| 2440 | zio_nowait(zio_vdev_child_io(zio, NULL, |
| 2441 | vd->vdev_child[rc->rc_devidx], |
| 2442 | rc->rc_offset, rc->rc_abd, rc->rc_size, |
| 2443 | zio->io_type, zio->io_priority, 0, |
| 2444 | vdev_raidz_child_done, rc)); |
| 2445 | nread++; |
| 2446 | } |
| 2447 | return (nread); |
| 2448 | } |
| 2449 | |
| 2450 | /* |
| 2451 | * We're here because either there were too many errors to even attempt |
no test coverage detected