If cp_commitCheckpoint is called twice at the same time, the second call
to setBowState will fail.
Add lock to remove possibility, and protect all uses of isCheckpointing
Bug: 138952436
Test: Boots after flashing in checkpoint mode
Change-Id: I131298adc506c3c176774d15e642b13d5f991087
Don't make stale zero'ing IO in block device after unlink, since filesystem
can reuse the block addresses and issue some IOs. If block layer reordered
two IOs, filesystem will see zero data, which crashes filesystem consistency.
Bug: 136964285
Test: run cts -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.CrossProfileAppsHostSideTest
Change-Id: I43c13622d094cecda1c53468adc240002111d605
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
am: 7d43cb0ae9 -s ours
am skip reason: change_id I8365a40298b752af4bb10d00d9ff58ce04beab1f with SHA1 236e5e800e is in history
Change-Id: I2b29a01279fcd03f35a17156d5eafc42ce510980
am: d5fe5cfcb5 -s ours
am skip reason: change_id I20441964dbc7b6ad5b445fa17a1374c1282bbbd8 with SHA1 3f1ce062d5 is in history
Change-Id: Iab7f9bf4e3d7968384b2a35ae398e60e84bf0664
am: 3507d68556 -s ours
am skip reason: change_id I20441964dbc7b6ad5b445fa17a1374c1282bbbd8 with SHA1 3f1ce062d5 is in history
Change-Id: I2a5fe3fc7bbf3af55facde1ab07bd0559d8e7d87
am: 13539f79f5 -s ours
am skip reason: change_id I8365a40298b752af4bb10d00d9ff58ce04beab1f with SHA1 236e5e800e is in history
Change-Id: I0ed87e8107d4007c42545397d2cb03628527671a
am: dde9704664 -s ours
am skip reason: change_id I8365a40298b752af4bb10d00d9ff58ce04beab1f with SHA1 236e5e800e is in history
Change-Id: I11c77206000895c27aee9ad8326778ec95e233df
When both ext4 user data checkpoints and metadata encryption are
enabled, we are creating two stacked dm devices. This had not been
properly thought through or debugged.
Test: Enable metadata encryption on taimen (add
keydirectory=/metadata/vold/metadata_encryption to flags for userdata in
fstab.hardware)
Unfortunately metadata is not wiped by fastboot -w, so it is
necessary to rm metadata/vold -rf whenever you wipe data.
fastboot flashall -w works
fastboot reboot -w works
A normal boot works
Disable checkpoint commits with
setprop persist.vold.dont_commit_checkpoint 1
vdc checkpoint startCheckpoint 10
adb reboot
wait for device to fully boot then
adb reboot
Wait for device to fully boot then
adb logcat -d | grep Checkpoint shows the rollback in the logs
This tests encryption on top of checkpoints with commit, encryption
without checkpoints, and rollback, which seems to be the key cases.
Also ran same tests on unmodified Taimen and Blueline
Bug: 135905679
Merged-In: I8365a40298b752af4bb10d00d9ff58ce04beab1f
Change-Id: I8365a40298b752af4bb10d00d9ff58ce04beab1f
am: cd5df6e1ef -s ours
am skip reason: change_id I1d50a7e52fda34e59eb6f051c7fde115a6cd5255 with SHA1 3d3a9a7f1c is in history
Change-Id: I8c1479273fc202237237f57a3ed2e79401083dd5
am: 0092301976 -s ours
am skip reason: change_id I1d50a7e52fda34e59eb6f051c7fde115a6cd5255 with SHA1 3d3a9a7f1c is in history
Change-Id: Ife2798dfa4052da6c8fe8512f5899efd3a11cfe8
When both ext4 user data checkpoints and metadata encryption are
enabled, we are creating two stacked dm devices. This had not been
properly thought through or debugged.
Test: Enable metadata encryption on taimen (add
keydirectory=/metadata/vold/metadata_encryption to flags for userdata in
fstab.hardware)
Unfortunately metadata is not wiped by fastboot -w, so it is
necessary to rm metadata/vold -rf whenever you wipe data.
fastboot flashall -w works
fastboot reboot -w works
A normal boot works
Disable checkpoint commits with
setprop persist.vold.dont_commit_checkpoint 1
vdc checkpoint startCheckpoint 10
adb reboot
wait for device to fully boot then
adb reboot
Wait for device to fully boot then
adb logcat -d | grep Checkpoint shows the rollback in the logs
This tests encryption on top of checkpoints with commit, encryption
without checkpoints, and rollback, which seems to be the key cases.
Bug: 135905679
Change-Id: I8365a40298b752af4bb10d00d9ff58ce04beab1f
am: 3601f4790b -s ours
am skip reason: change_id I1d50a7e52fda34e59eb6f051c7fde115a6cd5255 with SHA1 3d3a9a7f1c is in history
Change-Id: Ib97568c9eaecb3c52e4703f7d14a8235b9cc0cc4