android_system_core/fs_mgr/libsnapshot
Akilesh Kailash 533c2f6d55 Crash during OTA merge may lead to blocks with stale data
This is a corner case wherein a crash during OTA
merge can lead to missing of some COW operations to be
merged thereby some blocks may end up with stale data.

Fix here is to avoid any re-ordering of COW operations.
Merge the COW operations as present in the COW file.

New tests have been added to cow_snapuserd.

Bug: 194955361
Test: cow_snapuserd_test, Incremental OTA
Signed-off-by: Akilesh Kailash <akailash@google.com>
Merged-In: Id895fe7a3d6b4510676490a86d0caf62dec9b079
Change-Id: I14900b9537c4deb7824547e1dfe80f15274bdda4
Ignore-AOSP-First: manual merge from aosp
2021-07-29 16:30:01 +00:00
..
android/snapshot libsnapshot: Add a source build fingerprint to the update state. 2021-07-01 15:43:53 -07:00
corpus libsnapshot: Move ImageManager creation to DeviceInfo. 2021-05-13 11:33:38 -07:00
include/libsnapshot libsnapshot: Add a source build fingerprint to the update state. 2021-07-01 15:43:53 -07:00
include_test/libsnapshot libsnapshot: Move ImageManager creation to DeviceInfo. 2021-05-13 11:33:38 -07:00
update_engine libsnapshot: Retrieve COW version from update engine manifest 2021-04-30 06:46:24 +00:00
Android.bp Revert "Completely migrate init first stage to Soong" 2021-07-01 06:50:40 +00:00
cow_api_test.cpp libsnapshot: Check cluster size on appends 2021-04-12 21:52:06 -07:00
cow_decompress.cpp libsnapshot: Add support for brotli compression. 2020-09-15 16:15:33 -07:00
cow_decompress.h libsnapshot: Add support for brotli compression. 2020-09-15 16:15:33 -07:00
cow_format.cpp libsnapshot: Group CowOperations into clusters 2020-12-02 21:31:22 -08:00
cow_reader.cpp snapuserd: Remove assertions from daemon 2021-05-12 17:31:38 +00:00
cow_snapuserd_test.cpp Crash during OTA merge may lead to blocks with stale data 2021-07-29 16:30:01 +00:00
cow_writer.cpp libsnapshot:snapuserd: Add 2MB scratch space in COW file 2021-04-30 06:45:57 +00:00
device_info.cpp libsnapshot: Move ImageManager creation to DeviceInfo. 2021-05-13 11:33:38 -07:00
device_info.h libsnapshot: Move ImageManager creation to DeviceInfo. 2021-05-13 11:33:38 -07:00
dm_snapshot_internals.h COW file size: better explain the exception size 2021-02-17 09:47:13 +00:00
estimate_cow_from_nonab_ota.cpp reland: Rename Flush to Finalize 2020-10-22 02:34:26 -07:00
fuzz.sh Rename native code coverage paths env. variable in libsnapshot's fuzz test. 2020-06-10 13:04:53 +01:00
fuzz_utils.cpp libsnapshot_fuzzer: use protobuf 2020-04-30 23:05:36 -07:00
fuzz_utils.h Reland "libsnapshot_fuzzer: Add tests" 2020-05-15 14:34:01 -07:00
inspect_cow.cpp libsnapshot: Allow inspect_cow to show failed blocks 2021-04-29 21:58:58 +00:00
make_cow_from_ab_ota.cpp libsnapshot: Support cluster_ops in make_cow_from_ab_ota 2020-12-02 21:31:23 -08:00
OWNERS Add balsini@ as libsnapshot owner 2020-01-09 10:11:45 +00:00
partition_cow_creator.cpp libsnapshot: Collect more COW size data in snapshot merge stats. 2021-03-03 21:46:24 -08:00
partition_cow_creator.h libsnapshot: Use the compression algorithm specified in the DeltaArchiveManifest. 2021-03-03 18:27:54 -08:00
partition_cow_creator_test.cpp libsnapshot: COW size is computed within the container capability 2021-02-16 11:08:21 +00:00
power_test.cpp libsnapshot: Add a simple script and gtest to simulate power failures during snapshot-merge. 2020-04-14 23:32:38 -07:00
PowerTest.md libsnapshot: Add a simple script and gtest to simulate power failures during snapshot-merge. 2020-04-14 23:32:38 -07:00
return.cpp libsnapshot: delete WaitForMerge. 2020-03-03 13:19:49 -08:00
run_power_test.sh libsnapshot: Add a simple script and gtest to simulate power failures during snapshot-merge. 2020-04-14 23:32:38 -07:00
snapshot.cpp libsnapshot: Add a source build fingerprint to the update state. 2021-07-01 15:43:53 -07:00
snapshot_fuzz.cpp Use more inclusive language for #inclusivefixit 2020-07-23 11:13:37 -07:00
snapshot_fuzz_utils.cpp libsnapshot: Move ImageManager creation to DeviceInfo. 2021-05-13 11:33:38 -07:00
snapshot_fuzz_utils.h libsnapshot: Move ImageManager creation to DeviceInfo. 2021-05-13 11:33:38 -07:00
snapshot_metadata_updater.cpp Merge "libsnapshot: Properly set partial_update_" 2020-07-31 23:02:05 +00:00
snapshot_metadata_updater.h Update libsnapshot to handle partial update 2020-06-09 12:53:45 -07:00
snapshot_metadata_updater_test.cpp libsnapshot_test: skip global setup on non-VAB devices. 2020-08-06 17:21:50 -07:00
snapshot_reader.cpp libsnapshot: Group CowOperations into clusters 2020-12-02 21:31:22 -08:00
snapshot_reader.h libsnapshot: Implement OpenReader for CompressedSnapshotWriter. 2020-10-26 22:30:21 -07:00
snapshot_reader_test.cpp libsnapshot:snapuserd: Add 2MB scratch space in COW file 2021-04-30 06:45:57 +00:00
snapshot_stats.cpp libsnapshot: Add a source build fingerprint to the update state. 2021-07-01 15:43:53 -07:00
snapshot_stub.cpp libsnapshot: Add a source build fingerprint to the update state. 2021-07-01 15:43:53 -07:00
snapshot_test.cpp libsnapshot: Move ImageManager creation to DeviceInfo. 2021-05-13 11:33:38 -07:00
snapshot_writer.cpp Add a small testcase for snapshot writer. 2021-05-04 13:51:34 -04:00
snapshot_writer_test.cpp Add a small testcase for snapshot writer. 2021-05-04 13:51:34 -04:00
snapshotctl.cpp Add CLI entry point for map/unmap snapshot partitions 2021-03-22 13:43:14 -04:00
snapuserd.cpp Crash during OTA merge may lead to blocks with stale data 2021-07-29 16:30:01 +00:00
snapuserd.h snapuserd: Send header-response once per entire IO request 2021-05-19 01:01:52 +00:00
snapuserd.rc Add support for compressed snapshot merges in fastboot. 2021-02-04 20:21:18 -08:00
snapuserd_client.cpp libsnapshot: Pass MSG_NOSIGNAL socket flags 2021-04-27 02:36:18 +00:00
snapuserd_daemon.cpp snapuserd: Add a no-socket mode. 2020-12-14 00:48:50 -08:00
snapuserd_daemon.h snapuserd: Add a no-socket mode. 2020-12-14 00:48:50 -08:00
snapuserd_readahead.cpp snapuserd: Remove assertions from daemon 2021-05-12 17:31:38 +00:00
snapuserd_server.cpp snapuserd: Remove assertions from daemon 2021-05-12 17:31:38 +00:00
snapuserd_server.h libsnapshot:snapuserd: Fix memory leak 2021-04-02 00:49:18 +00:00
snapuserd_worker.cpp snapuserd: Send header-response once per entire IO request 2021-05-19 01:01:52 +00:00
test_helpers.cpp libsnapshot: Add a test for when partitions shrink and grow simultaneously. 2021-01-26 14:48:09 -08:00
utility.cpp libsnapshot: Pass the correct source device to snapuserd. 2021-01-20 18:17:08 -08:00
utility.h libsnapshot: Pass the correct source device to snapuserd. 2021-01-20 18:17:08 -08:00