update_engine: Activate CachedFileDescriptor

This patch activates CachedFileDescriptor for use in target_fd_. We
intend to use ExtentWriter for all payload operations. This patch alone
decreased the update time for a lumpy device from around 16 minutes down
to 2:30 minutes without necessarily putting pressure on memory. And that
is with O_DSYNC flag on.

BUG=chromium:762815
TEST=FEATURES="test" emerge-amd-generic update_engine; brillo_update_payload verify

Change-Id: Ie35a5e4d320496a9793c202c43271ff02b95a788
Reviewed-on: https://chromium-review.googlesource.com/674165
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Sen Jiang <senj@chromium.org>
1 file changed
tree: ab6e9fb110b2cebaed605c7ef1c1485478d58522
  1. .gitignore
  2. Android.mk
  3. CPPLINT.cfg
  4. MODULE_LICENSE_APACHE2
  5. NOTICE
  6. OWNERS
  7. PRESUBMIT.cfg
  8. PREUPLOAD.cfg
  9. UpdateEngine.conf
  10. WATCHLISTS
  11. binder_bindings/
  12. binder_service_android.cc
  13. binder_service_android.h
  14. binder_service_brillo.cc
  15. binder_service_brillo.h
  16. boot_control_android.cc
  17. boot_control_android.h
  18. boot_control_chromeos.cc
  19. boot_control_chromeos.h
  20. boot_control_chromeos_unittest.cc
  21. boot_control_recovery.cc
  22. boot_control_recovery.h
  23. boot_control_recovery_stub.cc
  24. certificate_checker.cc
  25. certificate_checker.h
  26. certificate_checker_unittest.cc
  27. chrome_browser_proxy_resolver.cc
  28. chrome_browser_proxy_resolver.h
  29. client_library/
  30. common/
  31. common_service.cc
  32. common_service.h
  33. common_service_unittest.cc
  34. connection_manager.cc
  35. connection_manager.h
  36. connection_manager_android.cc
  37. connection_manager_android.h
  38. connection_manager_interface.h
  39. connection_manager_unittest.cc
  40. connection_utils.cc
  41. connection_utils.h
  42. daemon.cc
  43. daemon.h
  44. daemon_state_android.cc
  45. daemon_state_android.h
  46. daemon_state_interface.h
  47. dbus_bindings/
  48. dbus_connection.cc
  49. dbus_connection.h
  50. dbus_service.cc
  51. dbus_service.h
  52. dbus_test_utils.h
  53. fake_file_writer.h
  54. fake_p2p_manager.h
  55. fake_p2p_manager_configuration.h
  56. fake_shill_proxy.cc
  57. fake_shill_proxy.h
  58. fake_system_state.cc
  59. fake_system_state.h
  60. generate_pc_file.sh
  61. hardware_android.cc
  62. hardware_android.h
  63. hardware_chromeos.cc
  64. hardware_chromeos.h
  65. hardware_chromeos_unittest.cc
  66. image_properties.h
  67. image_properties_android.cc
  68. image_properties_chromeos.cc
  69. image_properties_chromeos_unittest.cc
  70. init/
  71. libcurl_http_fetcher.cc
  72. libcurl_http_fetcher.h
  73. libupdate_engine-client-test.pc.in
  74. libupdate_engine-client.pc.in
  75. local_coverage_rate
  76. main.cc
  77. metrics.cc
  78. metrics.h
  79. metrics_utils.cc
  80. metrics_utils.h
  81. metrics_utils_unittest.cc
  82. mock_certificate_checker.h
  83. mock_connection_manager.h
  84. mock_file_writer.h
  85. mock_omaha_request_params.h
  86. mock_p2p_manager.h
  87. mock_payload_state.h
  88. mock_power_manager.h
  89. mock_proxy_resolver.h
  90. mock_update_attempter.h
  91. network_selector.h
  92. network_selector_android.cc
  93. network_selector_android.h
  94. network_selector_interface.h
  95. network_selector_stub.cc
  96. network_selector_stub.h
  97. omaha_request_action.cc
  98. omaha_request_action.h
  99. omaha_request_action_unittest.cc
  100. omaha_request_params.cc
  101. omaha_request_params.h
  102. omaha_request_params_unittest.cc
  103. omaha_response.h
  104. omaha_response_handler_action.cc
  105. omaha_response_handler_action.h
  106. omaha_response_handler_action_unittest.cc
  107. omaha_utils.cc
  108. omaha_utils.h
  109. omaha_utils_unittest.cc
  110. p2p_manager.cc
  111. p2p_manager.h
  112. p2p_manager_unittest.cc
  113. parcelable_update_engine_status.cc
  114. parcelable_update_engine_status.h
  115. payload_consumer/
  116. payload_generator/
  117. payload_state.cc
  118. payload_state.h
  119. payload_state_interface.h
  120. payload_state_unittest.cc
  121. power_manager_android.cc
  122. power_manager_android.h
  123. power_manager_chromeos.cc
  124. power_manager_chromeos.h
  125. power_manager_interface.h
  126. proxy_resolver.cc
  127. proxy_resolver.h
  128. proxy_resolver_unittest.cc
  129. pylintrc
  130. real_system_state.cc
  131. real_system_state.h
  132. run_unittests
  133. sample_images/
  134. sample_omaha_v3_response.xml
  135. scripts/
  136. service_delegate_android_interface.h
  137. service_observer_interface.h
  138. shill_proxy.cc
  139. shill_proxy.h
  140. shill_proxy_interface.h
  141. sideload_main.cc
  142. system_state.h
  143. tar_bunzip2.gypi
  144. test_http_server.cc
  145. test_subprocess.cc
  146. testrunner.cc
  147. unittest_key.pem
  148. unittest_key2.pem
  149. update_attempter.cc
  150. update_attempter.h
  151. update_attempter_android.cc
  152. update_attempter_android.h
  153. update_attempter_unittest.cc
  154. update_engine-client.gyp
  155. update_engine.conf
  156. update_engine.gyp
  157. update_engine.rc
  158. update_engine_client.cc
  159. update_engine_client_android.cc
  160. update_manager/
  161. update_metadata.proto
  162. update_payload_key/
  163. update_status_utils.cc
  164. update_status_utils.h
  165. utils_android.cc
  166. utils_android.h