fs_mgr:Add filter condition to make sure that the super block is correct.

Because full disk encryption make surper block is not except contents. Only
judge the magic number can prevent most of encrypted surper block.
In particular, magic number plaintext may be equal ciphertext. In order to
avoid this situation, we add the judgment of adaptive situation of the
s_rev_level, s_log_block_size and EXT4_INODE_SIZE.

Test: 1. Config fstab,userdata add flags: forceencrypt=footer,reservedsize=128M
      2. build a new target files, and flash all image.
      3. Config encrypt userdata surperblock,set magic number is 0xEF53
      4. reboot system and check log of fs_mgr.
Change-Id: I925584d58f17afabbb3aa91f8be2302518172bb2
Signed-off-by: katao <katao@xiaomi.com>
1 file changed