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

Function vdev_trim_stop_wait

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

* Wait for vdev trim threads which were listed to cleanly exit. */

Source from the content-addressed store, hash-verified

1001 * Wait for vdev trim threads which were listed to cleanly exit.
1002 */
1003void
1004vdev_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.

Callers 3

vdev_trim_stop_allFunction · 0.85
spa_vdev_trimFunction · 0.85
spa_vdev_split_mirrorFunction · 0.85

Calls 4

mutex_enterFunction · 0.85
vdev_trim_stop_wait_implFunction · 0.85
mutex_exitFunction · 0.85
list_remove_headFunction · 0.50

Tested by

no test coverage detected