| 184 | } |
| 185 | |
| 186 | static void |
| 187 | vdev_label_read(zio_t *zio, vdev_t *vd, int l, abd_t *buf, uint64_t offset, |
| 188 | uint64_t size, zio_done_func_t *done, void *private, int flags) |
| 189 | { |
| 190 | ASSERT( |
| 191 | spa_config_held(zio->io_spa, SCL_STATE, RW_READER) == SCL_STATE || |
| 192 | spa_config_held(zio->io_spa, SCL_STATE, RW_WRITER) == SCL_STATE); |
| 193 | ASSERT(flags & ZIO_FLAG_CONFIG_WRITER); |
| 194 | |
| 195 | zio_nowait(zio_read_phys(zio, vd, |
| 196 | vdev_label_offset(vd->vdev_psize, l, offset), |
| 197 | size, buf, ZIO_CHECKSUM_LABEL, done, private, |
| 198 | ZIO_PRIORITY_SYNC_READ, flags, B_TRUE)); |
| 199 | } |
| 200 | |
| 201 | void |
| 202 | vdev_label_write(zio_t *zio, vdev_t *vd, int l, abd_t *buf, uint64_t offset, |
no test coverage detected