Backport dm-crypt improvements from N7100