Originally Posted by modpunk
two weeks ago I cherry-picked the patches which are needed to have TRIM support for encrypted partitions using dm-crypt. They worked just fine and the speed improvement after calling 'fstrim -v /data' was tremendous.
Then I recognized that someone else already pushed them to CyanogenMod. The patches are sitting there and nobody feels responsible to add them to the tuna kernel. So here I am to try to call for help. If you build CM and have an encrypted partition please test them and give your REVIEW+.
I wouldn't mind some credit.
Seriously speaking, I've submitted those patches to CM's gerrit more than 2 months ago, with little to none attention. Probably the CM Inc. have priority over any serious feature.
I've also commented the availability of this patches on franco.kernel 2 months ago, and recently submitted a pull request on Github: https://github.com/franciscofranco/Tuna_JB_pre1/pull/1
Please comment to get franco's (and other kernel developer's) attention.
Also, please comment on CM's gerrit to get the device's maintainer attention: http://review.cyanogenmod.org/#/q/owner:%22Ignacio+Larrain%22+statuspen,n,z
Originally Posted by beekay201
Wasn't the use of fstrim on encrypted partitions looked down upon because of security?
a manta wrote this.
No, it wasn't. Fstrim is enabled on AOSP by default for all partitions (including encrypted ones), but AOSP encryption is built over dm-crypt, for which alow_discards wasn't introduced until kernel 3.1 (we are stuck on kernel 3.0). All other Nexus devices have fstrim enabled even on encrypted partitions, despite the potential security issues (reading the discarded blocks 'may' theoretically let you reverse the decryption key, thus enabling you to read the whole partition. In my opinion, a small trade off for making encryption usable).