Currently we sleep for 5ms before decrementing retries for the last
time. This is a waste of time, so bail out of the loop if the last
rmdir attempt fails.
Change-Id: Ia20840d27592b4eb3d9762647b19c111ff94209f
am skip reason: Merged-In Id86bcb915c8e2857bda26f64738dd5b643048e98 with SHA-1 1a3456f0bc is already in history
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2777228
Change-Id: Ifd591680244b71f7eb7d558f0454a291f82a1602
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In Id86bcb915c8e2857bda26f64738dd5b643048e98 with SHA-1 1a3456f0bc is already in history
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2777228
Change-Id: I22aef33ae94e8a3010a396e20adca89c2549ae84
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In Id86bcb915c8e2857bda26f64738dd5b643048e98 with SHA-1 1a3456f0bc is already in history
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2777228
Change-Id: I85f48c46e37a0fcd18061bec7c7208a1248122fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In Id86bcb915c8e2857bda26f64738dd5b643048e98 with SHA-1 1a3456f0bc is already in history
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2777228
Change-Id: Id85252ed6cede61a1e889f460c9d13b713c1fa0b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This code path was never invoked. is_logical will return false on
secondary partitions in retrofit devices, so nothing actually is ever
deleted. If we manage to call the delete, the device side code will
fail with "cannot open the super partition"
Test: fastboot flashall on sargo device
Change-Id: I20b430c5c30bf992506190ea4e00b0b69c7b1005
FastbootDevice::boot1_1 attempts to dereference a null pointer when the
boot_control_hal_ is not set. It needs a guard statement to prevent
that.
Test: Manually tested on device without BootControl.
Bug: 301682120
Change-Id: Id86bcb915c8e2857bda26f64738dd5b643048e98
This fixes the case when all the following conditions are true:
1: Incremental OTA
2: When there are sequence of overlapping COPY operations within one merge-window
(510 blocks)
3: Device is rebooted when snapshot-merge is in-progress of this
merge-window. When device reboots, the state of merge-window (of 510 blocks) was
merge-in-progress (aka - only partial set of blocks were merged in
this window thereby the state of the base device is in-complete for
this window)
4: During the next boot, if there any I/O request from the filesystem
which maps to the merge-window in (3):
a: The data has to be retrieved from the scratch space of the
COW until the snapshot-merge for that window is completed.
b: Once the snapshot-merge is complete for that window, data
has to be retrieved from base device.
The bug was in step 4(a) wherein I/O request was getting routed to base
device.
This patch addresses the above flow by fixing step 4(a).
A new vts test has been added to explicitly track this issue.
Additionally, there is no need to re-scan the partition if partition is in merge resume path. This should cut down the overhead of the scan.
Bug: 275296365
Test: 1: 100 iterations of ./vts_snapuserd_test --gtest_filter=SnapuserdTest.Snapshot_COPY_Overlap_Merge_Resume_IO_Validate_TEST
2: Incremental OTA on Pixel 6 Pro with multiple iterations of device
reboot when merge is in progress
Change-Id: Ib53be7f07ff192a84ec7f7049b2c6be01dad1041
Signed-off-by: Akilesh Kailash <akailash@google.com>
Refactor writer, reader + parser to work off v2 version of
CowOperations.
Test: m libsnapshot. ota on cuttlefish
Change-Id: Iec59be91e5f54782272b37702d645942df38c771
Reader + Parser v3 should be able to read V2 cow format written to disk.
This test reads in a small cow file written by basic_v2_cow_writer and
parses it to ensure this compatibility checks out.
Test: cow_api_test
Change-Id: I46ebf4e3f12cdb3e4716ca5b624aab5836086733