NAS OS - OpenZFS code-walk - vdev APIs - vdev_open() - vdev_close() - vdev_resilver_needed()
NAS OS - OpenZFS code-walk - vdev APIs - vdev_open() - vdev_close() - vdev_resilver_needed()

Refer:
OpenZFS Wiki ↗
openzfs.org ↗
TrueNAS (formerly FreeNAS) ↗
FreeBSD ↗