* Wait for the trimming thread to be terminated (canceled or stopped). */
| 986 | * Wait for the trimming thread to be terminated (canceled or stopped). |
| 987 | */ |
| 988 | static void |
| 989 | vdev_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. |
no test coverage detected