lineage OS encrypt phone --> bootloop I upgraded CM13 to LineageOS14.1 on a Xiaomi Note 3 (kenzo), setup everything, and decided to encrypt the phone (from settings/encrypt phone). It asked for a pattern, and then rebooted.

I never got to see a timer as seems to be expected from reading around. The phone got into a boot loop (vibrate, show MI logo, show lineage mascot for about a second, then reboot, over and over again). I left it doing this for about 40 minutes when I decided something was wrong.

I can now boot into TWRP 3.1.0-0, but any attempt to boot normally results in the above.

How can I get my phone to boot again? (if possible without losing data, I have backups, but if I can spare the hassle of reinstalling everything...).

The device was rooted, and I installed nightly lineage lineage-14.1-20170405-nightly-kenzo, along with gapps and lineage su package.

"Longer term", how do I encrypt the phone without breaking everything? Is there a bug in lineageOS (I've not seen anything on the bugtracker, except for another device (athene))?
For future reference, choosing repair for /data in TWRP seems to solve bootloops right after encryption. The device stays encrypted. This worked on two of my devices and I didn't notice any data loss.