* Wait for vdev trim threads which were listed to cleanly exit. */
| 1001 | * Wait for vdev trim threads which were listed to cleanly exit. |
| 1002 | */ |
| 1003 | void |
| 1004 | vdev_trim_stop_wait(spa_t *spa, list_t *vd_list) |
| 1005 | { |
| 1006 | vdev_t *vd; |
| 1007 | |
| 1008 | ASSERT(MUTEX_HELD(&spa_namespace_lock)); |
| 1009 | |
| 1010 | while ((vd = list_remove_head(vd_list)) != NULL) { |
| 1011 | mutex_enter(&vd->vdev_trim_lock); |
| 1012 | vdev_trim_stop_wait_impl(vd); |
| 1013 | mutex_exit(&vd->vdev_trim_lock); |
| 1014 | } |
| 1015 | } |
| 1016 | |
| 1017 | /* |
| 1018 | * Stop trimming a device, with the resultant trimming state being tgt_state. |
no test coverage detected