platform_system_core/fs_mgr
David Anderson a5cb671e94 liblp: Improve reliability of UpdatePartitionTable.
If UpdatePartitionTable is interrupted while writing metadata, the next
update becomes much more risky, as only one valid copy may exist. If
that subsequent update is interrupted, all metadata copies may be
corrupt.

To alleviate this, we now synchronize both metadata copies before each
update. If the backup copy is corrupted, we replace it with the primary
copy, and vice versa. Similarly if the primary and backup metadata do
not match, we sync the backup to contain the same data as the primary.

If for some reason this synchronization process fails, we do not proceed
to write a new partition table.

Bug: 79173901
Test: liblp_test gtest
Change-Id: Ic80cf9a5dc6336ff532e069ca5c8c76371550cb9
2018-07-11 17:14:12 -07:00
..
include fs_mgr: fs_mgr_update_verity_state take std::function 2018-06-28 08:43:35 -07:00
include_fstab/fstab fs_mgr: remove some unused functions 2018-06-07 16:49:01 -07:00
libdm fs_mgr: replace DM_TABLE_STATUS use with libdm. 2018-06-27 12:48:28 -07:00
liblp liblp: Improve reliability of UpdatePartitionTable. 2018-07-11 17:14:12 -07:00
tests fs_mgr: Add support in fs_mgr_read_fstab_file for /proc/mounts 2018-06-27 14:49:06 -07:00
tools fs_mgr: replace DM_TABLE_STATUS use with libdm. 2018-06-27 12:48:28 -07:00
.clang-format Fix-up coding style 2017-02-18 12:33:36 +08:00
Android.bp fs_mgr: remove fs_mgr_dm_ioctl 2018-06-27 12:48:29 -07:00
fs_mgr.cpp fs_mgr: fs_mgr_update_verity_state take std::function 2018-06-28 08:43:35 -07:00
fs_mgr_avb.cpp libdm: Add DmTargetVerity and use it in fs_mgr_avb. 2018-06-25 17:56:12 -07:00
fs_mgr_avb_ops.cpp fs_mgr: Adding logs when failing to wait for a device file 2017-07-06 09:51:02 +08:00
fs_mgr_boot_config.cpp fs_mgr: reorder getting boot config 2018-06-12 00:16:14 +08:00
fs_mgr_dm_linear.cpp fs_mgr: Use libdm for dm-linear devices. 2018-06-25 12:56:15 -07:00
fs_mgr_format.cpp make_f2fs: specify sector size for target image size and missing options 2018-04-04 09:24:24 -07:00
fs_mgr_fstab.cpp fs_mgr: Add support in fs_mgr_read_fstab_file for /proc/mounts 2018-06-27 14:49:06 -07:00
fs_mgr_priv.h init/fs_mgr: prototype first-stage dm-linear support 2018-05-14 12:43:42 -07:00
fs_mgr_priv_avb_ops.h fs_mgr: Update for new libavb API. 2017-05-15 12:04:18 -04:00
fs_mgr_priv_boot_config.h fs_mgr: fs_mgr_get_boot_config_from_kernel_cmdline deal with quote 2018-06-08 16:04:17 -07:00
fs_mgr_priv_sha.h fs_mgr_avb: refactors how vbmeta is loaded 2017-04-14 21:50:55 +08:00
fs_mgr_slotselect.cpp init/fs_mgr: prototype first-stage dm-linear support 2018-05-14 12:43:42 -07:00
fs_mgr_verity.cpp fs_mgr: Use libdm for fs_mgr_verity. 2018-06-26 12:41:47 -07:00
OWNERS Add OWNERS. 2017-12-07 13:30:03 -08:00