* Start an IO operation to a dRAID vdev. */
| 2188 | * Start an IO operation to a dRAID vdev. |
| 2189 | */ |
| 2190 | static void |
| 2191 | vdev_draid_io_start(zio_t *zio) |
| 2192 | { |
| 2193 | vdev_t *vd __maybe_unused = zio->io_vd; |
| 2194 | raidz_map_t *rm; |
| 2195 | |
| 2196 | ASSERT3P(vd->vdev_ops, ==, &vdev_draid_ops); |
| 2197 | ASSERT3U(zio->io_offset, ==, vdev_draid_get_astart(vd, zio->io_offset)); |
| 2198 | |
| 2199 | rm = vdev_draid_map_alloc(zio); |
| 2200 | |
| 2201 | if (zio->io_type == ZIO_TYPE_WRITE) { |
| 2202 | for (int i = 0; i < rm->rm_nrows; i++) { |
| 2203 | vdev_draid_io_start_write(zio, rm->rm_row[i]); |
| 2204 | } |
| 2205 | } else { |
| 2206 | ASSERT(zio->io_type == ZIO_TYPE_READ); |
| 2207 | |
| 2208 | for (int i = 0; i < rm->rm_nrows; i++) { |
| 2209 | vdev_draid_io_start_read(zio, rm->rm_row[i]); |
| 2210 | } |
| 2211 | } |
| 2212 | |
| 2213 | zio_execute(zio); |
| 2214 | } |
| 2215 | |
| 2216 | /* |
| 2217 | * Complete an IO operation on a dRAID vdev. The raidz logic can be applied |
nothing calls this directly
no test coverage detected