* 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.
| 1825 | * columns' VDevs as well. |
| 1826 | */ |
| 1827 | static void |
| 1828 | vdev_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. |
nothing calls this directly
no test coverage detected