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

Function vdev_trim_stop_wait_impl

freebsd/contrib/openzfs/module/zfs/vdev_trim.c:988–998  ·  view source on GitHub ↗

* Wait for the trimming thread to be terminated (canceled or stopped). */

Source from the content-addressed store, hash-verified

986 * Wait for the trimming thread to be terminated (canceled or stopped).
987 */
988static void
989vdev_trim_stop_wait_impl(vdev_t *vd)
990{
991 ASSERT(MUTEX_HELD(&vd->vdev_trim_lock));
992
993 while (vd->vdev_trim_thread != NULL)
994 cv_wait(&vd->vdev_trim_cv, &vd->vdev_trim_lock);
995
996 ASSERT3P(vd->vdev_trim_thread, ==, NULL);
997 vd->vdev_trim_exit_wanted = B_FALSE;
998}
999
1000/*
1001 * Wait for vdev trim threads which were listed to cleanly exit.

Callers 2

vdev_trim_stop_waitFunction · 0.85
vdev_trim_stopFunction · 0.85

Calls 1

cv_waitFunction · 0.85

Tested by

no test coverage detected