ahrens commented on this pull request.


> +
+       /*
+        * Another pool management task might be currently prevented from
+        * 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;

I take it that you don't want to make vti_done_cb take a spa_t*.  You can 
instead make spa_vdev_auto_trim_done() take a void*, and then assign it to a 
local variable of type spa_t*, without any casts.

-- 
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_r116150361
------------------------------------------
openzfs-developer
Archives: https://openzfs.topicbox-beta.com/groups/developer/
Powered by Topicbox: https://topicbox-beta.com

Reply via email to