fsync after block device writes

When markBoolSuccessful is invoked, we update
the partition table. These writes should be
synced before merge operation is resumed post OTA.
If not, any crash before these writes are landed to
backing storage will lead to incorrect switching of
slots.

BUG: 175711601
Bug: 177652253
Test: Verify slot switching correctly after crash when merge in progress
(on redbull)
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I4d30342b44aaeb7a4fdc915cc1e53ffb20c17a2f
1 file changed
tree: e64b38b55c4a0ab00e4f19a0a27329d5a184b67e
  1. audio/
  2. bootctrl/
  3. dumpstate/
  4. factory-images/
  5. gpt-utils/
  6. health/
  7. hidl/
  8. json-c/
  9. keymaster/
  10. nfc/
  11. overlay/
  12. overlay_packages/
  13. pixelstats/
  14. power/
  15. powerstats/
  16. rro_overlays/
  17. seccomp_policy/
  18. self-extractors/
  19. sunfish/
  20. thermal-engine/
  21. usb/
  22. vibrator/
  23. voice_processing/
  24. .clang-format
  25. Android.bp
  26. Android.mk
  27. AndroidProducts.mk
  28. aosp_sunfish.mk
  29. audio_policy_configuration.xml
  30. audio_policy_configuration_a2dp_offload_disabled.xml
  31. audio_policy_configuration_bluetooth_legacy_hal.xml
  32. audio_policy_volumes.xml
  33. bluetooth_hearing_aid_audio_policy_configuration.xml
  34. bluetooth_power_limits_sunfish.csv
  35. board-info.txt
  36. BoardConfig-common.mk
  37. CleanSpec.mk
  38. compatibility_matrix.xml
  39. component-overrides.xml
  40. config.fs
  41. default-permissions.xml
  42. device-common.mk
  43. device-sunfish.mk
  44. device.mk
  45. device_framework_matrix.xml
  46. fingerprint.mk
  47. framework_manifest.xml
  48. fstab.hardware
  49. fstab.postinstall
  50. gps.conf
  51. init.diagdebug.rc.userdebug
  52. init.fingerprint.sh
  53. init.hardware.chamber.rc.userdebug
  54. init.hardware.diag.rc.user
  55. init.hardware.diag.rc.userdebug
  56. init.hardware.ipa.rc.userdebug
  57. init.hardware.mpssrfs.rc.user
  58. init.hardware.mpssrfs.rc.userdebug
  59. init.hardware.power_debug.rc.userdebug
  60. init.hardware.rc
  61. init.hardware.usb.rc
  62. init.hardware.userdebug.rc.userdebug
  63. init.insmod.sunfish.cfg
  64. init.logging.rc
  65. init.mdm.sh
  66. init.msm.usb.configfs.rc
  67. init.power.rc
  68. init.qcom.modem_links.sh
  69. init.qcom.usb.rc
  70. init.qcom.usb.sh
  71. init.qti.getbootdevice.sh
  72. init.qti.qseecomd.sh
  73. init.radio.sh
  74. init.ramoops.sh
  75. init.recovery.device.rc
  76. init.sensors.sh
  77. manifest.xml
  78. media_codecs.xml
  79. media_codecs_omx.xml
  80. media_codecs_performance_c2.xml
  81. media_profiles.xml
  82. media_profiles_V1_0.xml
  83. p2p_supplicant_overlay.conf
  84. powerhint.json
  85. product.prop
  86. recovery.wipe
  87. sec_config
  88. sensors.hals.conf
  89. thermal-engine-sunfish.conf
  90. thermal_info_config_sunfish.json
  91. ueventd.rc
  92. uinput-fpc.idc
  93. uinput-fpc.kl
  94. utils.mk
  95. WCNSS_qcom_cfg.ini
  96. wifi_concurrency_cfg.txt
  97. wpa_supplicant_overlay.conf
  98. wpa_supplicant_wcn.conf