skiselkov commented on this pull request.
> + * starting and the current txg sync was invoked on its behalf,
+ * so be prepared to postpone autotrim processing.
+ */
+ if (!mutex_tryenter(&spa->spa_auto_trim_lock))
+ return;
+ spa->spa_num_auto_trimming += spa->spa_root_vdev->vdev_children;
+ mutex_exit(&spa->spa_auto_trim_lock);
+
+ for (uint64_t i = 0; i < spa->spa_root_vdev->vdev_children; i++) {
+ vdev_trim_info_t *vti = kmem_zalloc(sizeof (*vti), KM_SLEEP);
+ vti->vti_vdev = spa->spa_root_vdev->vdev_child[i];
+ vti->vti_txg = txg;
+ vti->vti_done_cb = (void (*)(void *))spa_vdev_auto_trim_done;
+ vti->vti_done_arg = spa;
+ (void) taskq_dispatch(spa->spa_auto_trim_taskq,
+ (void (*)(void *))vdev_auto_trim, vti, TQ_SLEEP);
Again, I'd like to keep the mechanism generic.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/172#discussion_r116135077
------------------------------------------
openzfs-developer
Archives: https://openzfs.topicbox-beta.com/groups/developer/
Powered by Topicbox: https://topicbox-beta.com