* Recursively copy vdev paths from one root vdev to another. Source and * destination vdev trees may differ in geometry. For each destination leaf * vdev, search a vdev with the same guid and top vdev id in the source. * Intended to copy paths from userland config into MOS config. */
| 2331 | * Intended to copy paths from userland config into MOS config. |
| 2332 | */ |
| 2333 | void |
| 2334 | vdev_copy_path_relaxed(vdev_t *srvd, vdev_t *drvd) |
| 2335 | { |
| 2336 | uint64_t children = MIN(srvd->vdev_children, drvd->vdev_children); |
| 2337 | ASSERT(srvd->vdev_ops == &vdev_root_ops); |
| 2338 | ASSERT(drvd->vdev_ops == &vdev_root_ops); |
| 2339 | |
| 2340 | for (uint64_t i = 0; i < children; i++) { |
| 2341 | vdev_copy_path_search(srvd->vdev_child[i], |
| 2342 | drvd->vdev_child[i]); |
| 2343 | } |
| 2344 | } |
| 2345 | |
| 2346 | /* |
| 2347 | * Close a virtual device. |
no test coverage detected