summaryrefslogtreecommitdiff
path: root/Checkpoint.h
Commit message (Collapse)AuthorAgeFilesLines
* Change abortChanges to take a message and boolDaniel Rosenberg2019-03-211-1/+1
| | | | | | | | | | | | | | abortChanges will attempt to pass a reboot message, and will only reboot if the device is currently checkpointing. Additionally, it can opt to attempt to prevent future attempts. This only works for non-bootloader controlled updates. Failures are ignored, as it will always reboot the device. In the unlikely event of such a failure, the device will continue to retry as though you did not ask to prevent future attempts. Test: vdc checkpoint abortChanges abort_retry_test 1 vdc checkpoint abortChanges abort_noretry_test 0 Change-Id: I7b6214765a1faaf4fd193c73331696b53ae572d2
* Add vdc checkpoint supportsBlockCheckpointPaul Lawrence2019-03-181-0/+4
| | | | | | | | | | Also add vdc checkpoint supportsFileCheckpoint This is to allow tests to be specific to supported checkpoint mode. Test: Built on Taimen and Crosshatch, made sure both new functions work as expected Change-Id: I0eab7453b13c0a2e31840ef9ad24a692cec55b00
* Add vdc checkpoint restoreCheckpointPartDaniel Rosenberg2019-03-071-1/+1
| | | | | | | | Restores the first n entries of a checkpoint. Allows automated testing of interrupted restores. Test: vdc checkpoint restoreCheckpoint [device] [n] Change-Id: I47570e8eba0bc3c6549a04a33600df05d393990b
* Add supportsCheckpointDaniel Rosenberg2019-01-221-0/+2
| | | | | | | | | | | This returns true if any entries in the fstab have checkpoint= set. Test: Call vdc checkpoint supportsCheckpoint. Should return 1 iff an fstab entry has checkpoint=fs or checkpoint=block set Bug: 111020314 Change-Id: Ic79bc96ded4da6605f73992dcff542e7cb50d705
* Switch to exceptions for most cp callsDaniel Rosenberg2018-10-161-6/+7
| | | | | | | | | | | | This switches the checkpoint calls that don't need to return a value to return 0 on success, and an error on failure. This will be transalted to exceptions for java binder users. needsCheckpoint and needsRollback still return a boolean value. Test: vdc setCheckpoint 2 then reboot 3 times checking state Bug: 112901762 Change-Id: Idd3b5e6036631562a86d5123f533b86cf3bd6032 Merged-In: Idd3b5e6036631562a86d5123f533b86cf3bd6032
* Handle retry countDaniel Rosenberg2018-10-151-1/+1
| | | | | | Test: vdc setCheckpoint 2 then reboot 3 times checking state Bug: 112901762 Change-Id: I85a71d059bca27b76175b9bd8465cc453f0ddb8d
* Add checkpointing support for A/B updatesDaniel Rosenberg2018-10-031-1/+1
| | | | | | | | | | | This adds implicit rollback support during A/B style updates. If you explicitly start a checkpoint with -1, needsRollback will trigger if the update fails, and should be used if any additional cleanup is needed that is not covered by A/B itself. Test: All Checkpoint tests pass Bug: 111020314 Change-Id: I88b4a1098c6bac4dc1438a54c8a8f59577a6c17b
* Make checkpointing work on ext4Paul Lawrence2018-10-031-0/+2
| | | | | Test: All tests pass Change-Id: I2a6cdf1edfe752f4633e1931e75d18659653938c
* Add support for checkpointingDaniel Rosenberg2018-09-211-0/+42
Checkpointing uses a combination of files on the meta partition and the checkpoint= fs_mgr flag. Checkpointed partitions will revert to their starting state on reboot unless checkpoint commit is called. Test: Run vdc commands, check file on metadata Merged-In: Icba16578608a6cbf922472e9d4ae5b8cf5f016c6 Change-Id: Icba16578608a6cbf922472e9d4ae5b8cf5f016c6