{"action":"created","issue":{"url":"https://api.github.com/repos/zfsonlinux/zfs/issues/3656","repository_url":"https://api.github.com/repos/zfsonlinux/zfs","labels_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/3656/labels{/name}","comments_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/3656/comments","events_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/3656/events","html_url":"https://github.com/zfsonlinux/zfs/pull/3656","id":98622548,"number":3656,"title":"TRIM/Discard support from Nexenta","user":{"login":"dweeezil","id":1432005,"avatar_url":"https://avatars.githubusercontent.com/u/1432005?v=3","gravatar_id":"","url":"https://api.github.com/users/dweeezil","html_url":"https://github.com/dweeezil","followers_url":"https://api.github.com/users/dweeezil/followers","following_url":"https://api.github.com/users/dweeezil/following{/other_user}","gists_url":"https://api.github.com/users/dweeezil/gists{/gist_id}","starred_url":"https://api.github.com/users/dweeezil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dweeezil/subscriptions","organizations_url":"https://api.github.com/users/dweeezil/orgs","repos_url":"https://api.github.com/users/dweeezil/repos","events_url":"https://api.github.com/users/dweeezil/events{/privacy}","received_events_url":"https://api.github.com/users/dweeezil/received_events","type":"User","site_admin":false},"labels":[{"id":40358,"url":"https://api.github.com/repos/zfsonlinux/zfs/labels/Feature","name":"Feature","color":"02d7e1","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/zfsonlinux/zfs/milestones/11","html_url":"https://github.com/zfsonlinux/zfs/milestones/0.7.0","labels_url":"https://api.github.com/repos/zfsonlinux/zfs/milestones/11/labels","id":7013,"number":11,"title":"0.7.0","description":"ZFS on Linux v0.7.0 - Memory management\r\n\r\n","creator":{"login":"behlendorf","id":148917,"avatar_url":"https://avatars.githubusercontent.com/u/148917?v=3","gravatar_id":"","url":"https://api.github.com/users/behlendorf","html_url":"https://github.com/behlendorf","followers_url":"https://api.github.com/users/behlendorf/followers","following_url":"https://api.github.com/users/behlendorf/following{/other_user}","gists_url":"https://api.github.com/users/behlendorf/gists{/gist_id}","starred_url":"https://api.github.com/users/behlendorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/behlendorf/subscriptions","organizations_url":"https://api.github.com/users/behlendorf/orgs","repos_url":"https://api.github.com/users/behlendorf/repos","events_url":"https://api.github.com/users/behlendorf/events{/privacy}","received_events_url":"https://api.github.com/users/behlendorf/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":316,"state":"open","created_at":"2011-05-03T17:38:46Z","updated_at":"2016-10-25T20:21:10Z","due_on":null,"closed_at":null},"comments":195,"created_at":"2015-08-02T17:10:22Z","updated_at":"2016-11-06T13:45:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/zfsonlinux/zfs/pulls/3656","html_url":"https://github.com/zfsonlinux/zfs/pull/3656","diff_url":"https://github.com/zfsonlinux/zfs/pull/3656.diff","patch_url":"https://github.com/zfsonlinux/zfs/pull/3656.patch"},"body":"This patch stack includes Nextenta's support for TRIM/Discard on disk and file vdevs as well as an update to the dkio headers for appropriate Solaris compatibility.  It requires the current https://github.com/dweeezil/spl/tree/ntrim patch in order to compile properly.\n\nThe usual disclaimers apply at this point:  I've performed moderate testing with ext4-backed file vdevs and light testing with SSD-backed disk vdevs and it appears to work properly.  Use at your own risk.  It may DESTROY YOUR DATA!  I'm posting the pull request because it seems to work during initial testing and I'd like the buildbots to get a chance at it (which I'm expecting to fail unless they use the corresponding SPL code).\n\nThe initial TRIM support (currently in commit 719301c) caused frequent deadlocks in ztest due to the SCL_ALL spa locking during the trim operations.  The follow-on patch to support on-demand trim changed the locking scheme and I'm no longer seeing deadlocks with either ztest or normal operation.\n\nThe final last commit (currently 9e5cfd7) adds ZIL logging for zvol trim operations.  This code was mostly borrowed from an older Nexenta patch (referenced in the commit log) and has been merged into the existing zvol trim function.\n\nIn order to enable the feature, you must use `zpool set autotrim=on` on the pool and the `zfs_trim` module parameter must be set to 1 (which is its default value).  The `zfs_trim` parameter controls the lower-level vdev trimming whereas the pool property controls it at a higher level.  By default, trims are batched and only applied every 32 transaction groups as controlled by the new `zfs_txgs_per_trim` parameter.  This allows for `zpool import -T` to continue to be useful.  Finally, by default, only regions of at least 1MiB are trimmed as set by the `zfs_trim_min_ext_sz` module parameter. \n"},"comment":{"url":"https://api.github.com/repos/zfsonlinux/zfs/issues/comments/258681772","html_url":"https://github.com/zfsonlinux/zfs/pull/3656#issuecomment-258681772","issue_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/3656","id":258681772,"user":{"login":"dweeezil","id":1432005,"avatar_url":"https://avatars.githubusercontent.com/u/1432005?v=3","gravatar_id":"","url":"https://api.github.com/users/dweeezil","html_url":"https://github.com/dweeezil","followers_url":"https://api.github.com/users/dweeezil/followers","following_url":"https://api.github.com/users/dweeezil/following{/other_user}","gists_url":"https://api.github.com/users/dweeezil/gists{/gist_id}","starred_url":"https://api.github.com/users/dweeezil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dweeezil/subscriptions","organizations_url":"https://api.github.com/users/dweeezil/orgs","repos_url":"https://api.github.com/users/dweeezil/repos","events_url":"https://api.github.com/users/dweeezil/events{/privacy}","received_events_url":"https://api.github.com/users/dweeezil/received_events","type":"User","site_admin":false},"created_at":"2016-11-06T13:45:30Z","updated_at":"2016-11-06T13:45:30Z","body":"Here's a quick status update: I'm working on adding some tests to the test suite to verify the operation of TRIM.  It's a bit of a slow go, however, because I've not worked with the test suite before and am trying to be careful to do things the Right Way.\r\n\r\nAs to @gaurkuma's patch to skip never-allocated metaslabs for manual trim, I will be putting it into the next refresh, however, there will be additional documentation to explain the behavior and, maybe even a tunable to override it. My concern is the likely common use case of re-using an SSD (or partition on same) from another system.  The documention will suggest doing either a security erase or a ```blkdiscard``` as appropriate before adding it to a ZFS pool."}}
{"actor":{"display_login":"dweeezil"}}