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

Function vdev_copy_path_relaxed

freebsd/contrib/openzfs/module/zfs/vdev.c:2333–2344  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

2331 * Intended to copy paths from userland config into MOS config.
2332 */
2333void
2334vdev_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.

Callers 1

spa_ld_trusted_configFunction · 0.85

Calls 1

vdev_copy_path_searchFunction · 0.85

Tested by

no test coverage detected