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

Function vdev_raidz_io_start

freebsd/contrib/openzfs/module/zfs/vdev_raidz.c:1827–1856  ·  view source on GitHub ↗

* Start an IO operation on a RAIDZ VDev * * Outline: * - For write operations: * 1. Generate the parity data * 2. Create child zio write operations to each column's vdev, for both * data and parity. * 3. If the column skips any sectors for padding, create optional dummy * write zio children for those areas to improve aggregation continuity. * - For read operations: * 1.

Source from the content-addressed store, hash-verified

1825 * columns' VDevs as well.
1826 */
1827static void
1828vdev_raidz_io_start(zio_t *zio)
1829{
1830 vdev_t *vd = zio->io_vd;
1831 vdev_t *tvd = vd->vdev_top;
1832 vdev_raidz_t *vdrz = vd->vdev_tsd;
1833 raidz_map_t *rm;
1834
1835 rm = vdev_raidz_map_alloc(zio, tvd->vdev_ashift,
1836 vdrz->vd_logical_width, vdrz->vd_nparity);
1837
1838 /*
1839 * Until raidz expansion is implemented all maps for a raidz vdev
1840 * contain a single row.
1841 */
1842 ASSERT3U(rm->rm_nrows, ==, 1);
1843 raidz_row_t *rr = rm->rm_row[0];
1844
1845 zio->io_vsd = rm;
1846 zio->io_vsd_ops = &vdev_raidz_vsd_ops;
1847
1848 if (zio->io_type == ZIO_TYPE_WRITE) {
1849 vdev_raidz_io_start_write(zio, rr, tvd->vdev_ashift);
1850 } else {
1851 ASSERT(zio->io_type == ZIO_TYPE_READ);
1852 vdev_raidz_io_start_read(zio, rr);
1853 }
1854
1855 zio_execute(zio);
1856}
1857
1858/*
1859 * Report a checksum error for a child of a RAID-Z device.

Callers

nothing calls this directly

Calls 4

vdev_raidz_map_allocFunction · 0.85
vdev_raidz_io_start_readFunction · 0.85
zio_executeFunction · 0.85

Tested by

no test coverage detected