behlendorf commented on this pull request.


> +                         spa_get_force_trim(vd->vdev_spa) !=
+                           SPA_FORCE_TRIM_ON) {
+                               zio->io_error = SET_ERROR(ENOTSUP);
+                               break;
+                       }
+
+                       /*
+                        * zio->io_private contains a dkioc_free_list_t
+                        * specifying which offsets are to be freed
+                        */
+                       ASSERT(zio->io_dfl != NULL);
+                       error = ldi_ioctl(dvd->vd_lh, zio->io_cmd,
+                           (uintptr_t)zio->io_dfl, FKIOCTL, kcred, NULL);
+
+                       if (error == ENOTSUP || error == ENOTTY)
+                               vd->vdev_notrim = B_TRUE;

What do you think about moving this to `zio_vdev_io_assess()` for consistency 
with `DKIOCFLUSHWRITECACHE`. Like this 
https://github.com/zfsonlinux/zfs/pull/5925/commits/77745912220848c7cef80ce515aa4e665717ae2e#diff-bdeb26c3e7b126b07c42b8583f57a2b9R3655.

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

Reply via email to