Avoid to format raw disk if metadata encryption is enabled
The current flow is
1. factory reset formatted raw disk.
2. next boot tries to convert it to metadata encryption
2.a mount sda27
2.b umount sda27
2.c encrypt_inplace()
2.d fsck on dm-x
2.e mount dm-x
The #2 flow is unnecessary, if we know the disk will be encrypted. And, that
gives a change of the failure when unmounting the raw disk by starting some
file operations on /data. That can cause the entire encryption failure.
Bug: 208161227
Signed-off-by:
Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Iaedfeb74bb6abb667efee6dcadf8d66272466ee0
Loading
Please register or sign in to comment