{"action":"created","issue":{"url":"https://api.github.com/repos/TeamWin/android_device_oneplus_oneplus2/issues/7","repository_url":"https://api.github.com/repos/TeamWin/android_device_oneplus_oneplus2","labels_url":"https://api.github.com/repos/TeamWin/android_device_oneplus_oneplus2/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/TeamWin/android_device_oneplus_oneplus2/issues/7/comments","events_url":"https://api.github.com/repos/TeamWin/android_device_oneplus_oneplus2/issues/7/events","html_url":"https://github.com/TeamWin/android_device_oneplus_oneplus2/issues/7","id":207369506,"number":7,"title":"Support for allow-discards for dm-crypt possible?","user":{"login":"capi","id":254852,"avatar_url":"https://avatars3.githubusercontent.com/u/254852?v=4","gravatar_id":"","url":"https://api.github.com/users/capi","html_url":"https://github.com/capi","followers_url":"https://api.github.com/users/capi/followers","following_url":"https://api.github.com/users/capi/following{/other_user}","gists_url":"https://api.github.com/users/capi/gists{/gist_id}","starred_url":"https://api.github.com/users/capi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capi/subscriptions","organizations_url":"https://api.github.com/users/capi/orgs","repos_url":"https://api.github.com/users/capi/repos","events_url":"https://api.github.com/users/capi/events{/privacy}","received_events_url":"https://api.github.com/users/capi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-02-13T23:19:36Z","updated_at":"2018-05-14T12:46:10Z","closed_at":"2018-04-12T06:12:02Z","author_association":"NONE","body":"I have a fully encrypted OnePlus 2, and I have the \"feeling\", that it doesn't get `fstrim`-ed on the `/data` partition. This is mostly expected, since this is information disclosure. `dm-crypt` supports `allow-discards` since some versions and I had hoped that I could call `fstrim` from TWRP.\r\n\r\nWhile I can call `fstrim` on `/cache`, it fails on the (decrypted) `/data` with this message:\r\n```\r\n# fstrim -v /data\r\nfstrim -v /data\r\nfstrim: FITRIM: Operation not supported on transport endpoint\r\n```\r\n\r\nI _think_, this is an indication that the crypt-device was created without the `allow-discards` option, since the flash seems to support discard, since it works on `/cache`.\r\n\r\nAny chance on enabling the `allow-discards` option for TWRP, so that people who really want it, can trim the encrypted /data?"},"comment":{"url":"https://api.github.com/repos/TeamWin/android_device_oneplus_oneplus2/issues/comments/388803959","html_url":"https://github.com/TeamWin/android_device_oneplus_oneplus2/issues/7#issuecomment-388803959","issue_url":"https://api.github.com/repos/TeamWin/android_device_oneplus_oneplus2/issues/7","id":388803959,"user":{"login":"steadfasterX","id":8750713,"avatar_url":"https://avatars3.githubusercontent.com/u/8750713?v=4","gravatar_id":"","url":"https://api.github.com/users/steadfasterX","html_url":"https://github.com/steadfasterX","followers_url":"https://api.github.com/users/steadfasterX/followers","following_url":"https://api.github.com/users/steadfasterX/following{/other_user}","gists_url":"https://api.github.com/users/steadfasterX/gists{/gist_id}","starred_url":"https://api.github.com/users/steadfasterX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steadfasterX/subscriptions","organizations_url":"https://api.github.com/users/steadfasterX/orgs","repos_url":"https://api.github.com/users/steadfasterX/repos","events_url":"https://api.github.com/users/steadfasterX/events{/privacy}","received_events_url":"https://api.github.com/users/steadfasterX/received_events","type":"User","site_admin":false},"created_at":"2018-05-14T12:46:10Z","updated_at":"2018-05-14T12:46:10Z","author_association":"NONE","body":"yea system.img etc will not be created when building twrp but I still don't understand why that would be needed to enable fstrim on encrypted partitions. what is the relationship between img files and fstrim?"}}
{"actor":{"display_login":"steadfasterX"}}