| 199 | } |
| 200 | |
| 201 | void |
| 202 | vdev_label_write(zio_t *zio, vdev_t *vd, int l, abd_t *buf, uint64_t offset, |
| 203 | uint64_t size, zio_done_func_t *done, void *private, int flags) |
| 204 | { |
| 205 | ASSERT( |
| 206 | spa_config_held(zio->io_spa, SCL_STATE, RW_READER) == SCL_STATE || |
| 207 | spa_config_held(zio->io_spa, SCL_STATE, RW_WRITER) == SCL_STATE); |
| 208 | ASSERT(flags & ZIO_FLAG_CONFIG_WRITER); |
| 209 | |
| 210 | zio_nowait(zio_write_phys(zio, vd, |
| 211 | vdev_label_offset(vd->vdev_psize, l, offset), |
| 212 | size, buf, ZIO_CHECKSUM_LABEL, done, private, |
| 213 | ZIO_PRIORITY_SYNC_WRITE, flags, B_TRUE)); |
| 214 | } |
| 215 | |
| 216 | /* |
| 217 | * Generate the nvlist representing this vdev's stats |
no test coverage detected