skiselkov commented on this pull request.


> +
+       spa_config_enter(spa, SCL_STATE_ALL, FTAG, RW_READER);
+       ASSERT(vd->vdev_ms[0] != NULL);
+       cursor = vd->vdev_ms[0]->ms_start;
+       i = 0;
+       while (i < vti->vti_vdev->vdev_ms_count && !spa->spa_man_trim_stop) {
+               uint64_t delta;
+               metaslab_t *msp = vd->vdev_ms[i];
+               zio_t *trim_io;
+
+               trim_io = metaslab_trim_all(msp, &cursor, &delta, &was_loaded);
+               spa_config_exit(spa, SCL_STATE_ALL, FTAG);
+
+               if (trim_io != NULL) {
+                       ASSERT3U(cursor, >=, vd->vdev_ms[0]->ms_start);
+                       vd->vdev_trim_prog = cursor - vd->vdev_ms[0]->ms_start;

I'll try to implement that.

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

Reply via email to