MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vdev_draid_io_start

Function vdev_draid_io_start

freebsd/contrib/openzfs/module/zfs/vdev_draid.c:2190–2214  ·  view source on GitHub ↗

* Start an IO operation to a dRAID vdev. */

Source from the content-addressed store, hash-verified

2188 * Start an IO operation to a dRAID vdev.
2189 */
2190static void
2191vdev_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

Callers

nothing calls this directly

Calls 5

vdev_draid_get_astartFunction · 0.85
vdev_draid_map_allocFunction · 0.85
vdev_draid_io_start_readFunction · 0.85
zio_executeFunction · 0.85

Tested by

no test coverage detected