OSDN Git Service

EncryptInPlace: ensure that backup superblocks get encrypted
authorWill Shiu <Will.Shiu@mediatek.com>
Wed, 29 Jul 2020 09:03:17 +0000 (17:03 +0800)
committerEric Biggers <ebiggers@google.com>
Wed, 12 Aug 2020 16:34:11 +0000 (09:34 -0700)
commit3aa4dc7f64b5948c29121240a2b7b5eda2806231
treec32329cdbe3f39063d6ae2c0da62e23414decdee
parent1f6e9af5b1ddecebfbc8b4ea6217ddf7691cfd95
EncryptInPlace: ensure that backup superblocks get encrypted

Block groups with EXT4_BG_BLOCK_UNINIT still have backup superblocks
(and backup block group descriptors).  Fix EncryptInPlace to encrypt
these backup superblocks rather than leave them unencrypted.

Previously leaving the backup superblocks unencrypted didn't cause any
problems, but due to system/core commit 72abd7b246f7 ("Try to recover
corrupted ext4 /data with backup superblock") it is causing problems.

Bug: 162479411
Bug: 161871210
Merged-In: Ic090bf4e88193b289b04c5254ddf661ef40b037e
Change-Id: Ic090bf4e88193b289b04c5254ddf661ef40b037e
EncryptInplace.cpp