skiselkov commented on this pull request.


> +             /* delay loop to handle fixed-rate trimming */
+               for (;;) {
+                       uint64_t rate = spa->spa_man_trim_rate;
+                       uint64_t sleep_delay;
+                       clock_t t1;
+
+                       if (rate == 0) {
+                               /* No delay, just update 't' and move on. */
+                               t = ddi_get_lbolt();
+                               break;
+                       }
+
+                       sleep_delay = (delta * hz) / rate;
+                       mutex_enter(&spa->spa_man_trim_lock);
+                       t1 = cv_timedwait(&spa->spa_man_trim_update_cv,
+                           &spa->spa_man_trim_lock, t + sleep_delay);

Ok, will reimplement.

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

Reply via email to