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

Function vdev_trim_stop_all_impl

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

* Requests that all listed vdevs stop trimming. */

Source from the content-addressed store, hash-verified

1053 * Requests that all listed vdevs stop trimming.
1054 */
1055static void
1056vdev_trim_stop_all_impl(vdev_t *vd, vdev_trim_state_t tgt_state,
1057 list_t *vd_list)
1058{
1059 if (vd->vdev_ops->vdev_op_leaf && vdev_is_concrete(vd)) {
1060 mutex_enter(&vd->vdev_trim_lock);
1061 vdev_trim_stop(vd, tgt_state, vd_list);
1062 mutex_exit(&vd->vdev_trim_lock);
1063 return;
1064 }
1065
1066 for (uint64_t i = 0; i < vd->vdev_children; i++) {
1067 vdev_trim_stop_all_impl(vd->vdev_child[i], tgt_state,
1068 vd_list);
1069 }
1070}
1071
1072/*
1073 * Convenience function to stop trimming of a vdev tree and set all trim

Callers 1

vdev_trim_stop_allFunction · 0.85

Calls 4

vdev_is_concreteFunction · 0.85
mutex_enterFunction · 0.85
vdev_trim_stopFunction · 0.85
mutex_exitFunction · 0.85

Tested by

no test coverage detected