cryptfs: Update the size of dm-crypt device according to sector size

The legacy method for metadata encryption on adoptable storage failed
when the size of the block device isn't a multiple of the crypto sector size.

Update the size of dm-crypt device according to sector size
before construct dm_target.

Bug: 248582018
Change-Id: I5c78889bdfedca7f7b0704500fc313d7a48d5a3b
Signed-off-by: Hongyu Jin <hongyu.jin@unisoc.com>
1 file changed