Mount vfat, exfat, ntfs, hfsplus, ext filesystems with 'dirsync' option.

This CL uses the 'dirsync' mount option to ensure synchronous directory
operations, which helps reduce the potential damages caused by an unsafe
removal of a removable drive.

BUG=chrome-os-partner:26006
BUG=chrome-os-partner:26063
TEST=Tested the following:
1. Build and run unit tests.
2. Run the following tests:
   - platform_CrosDisksDBus
   - platform_CrosDisksFilesystem
   - platform_CrosDisksArchive
   - platform_CrosDisksFormat
3. Plug in USB drives with vfat, exfat, ntfs, hfsplus, and ext2/3/4
   formatted partitions. Verify that the partitions are mounted with the
   dirsync option and show up in Files.app.

Change-Id: Ia4ed4986d1604b4be82022f2d67ddbd5bb43424c
Reviewed-on: https://chromium-review.googlesource.com/187865
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Toni Barzic <tbarzic@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
4 files changed
tree: 4b2be9206716ed236e71d0f25f38a1356072ae4b
  1. .gitignore
  2. LICENSE
  3. OWNERS
  4. archive_manager.cc
  5. archive_manager.h
  6. archive_manager_unittest.cc
  7. avfsd-seccomp-amd64.policy
  8. avfsd-seccomp-arm.policy
  9. avfsd-seccomp-x86.policy
  10. cros-disks.conf
  11. cros-disks.gyp
  12. cros_disks_server.cc
  13. cros_disks_server.h
  14. daemon.cc
  15. daemon.h
  16. dbus_bindings/
  17. device_ejector.cc
  18. device_ejector.h
  19. device_event.cc
  20. device_event.h
  21. device_event_dispatcher_interface.h
  22. device_event_moderator.cc
  23. device_event_moderator.h
  24. device_event_moderator_unittest.cc
  25. device_event_queue.cc
  26. device_event_queue.h
  27. device_event_queue_unittest.cc
  28. device_event_source_interface.h
  29. disk.cc
  30. disk.h
  31. disk_manager.cc
  32. disk_manager.h
  33. disk_manager_unittest.cc
  34. disk_unittest.cc
  35. disks_testrunner.cc
  36. exfat_mounter.cc
  37. exfat_mounter.h
  38. external_mounter.cc
  39. external_mounter.h
  40. external_mounter_unittest.cc
  41. file_reader.cc
  42. file_reader.h
  43. file_reader_unittest.cc
  44. filesystem.cc
  45. filesystem.h
  46. format_manager.cc
  47. format_manager.h
  48. format_manager_observer_interface.h
  49. format_manager_unittest.cc
  50. fuse_mounter.cc
  51. fuse_mounter.h
  52. glib_process.cc
  53. glib_process.h
  54. glib_process_unittest.cc
  55. inherit-review-settings-ok
  56. main.cc
  57. metrics.cc
  58. metrics.h
  59. metrics_unittest.cc
  60. mount_info.cc
  61. mount_info.h
  62. mount_info_unittest.cc
  63. mount_manager.cc
  64. mount_manager.h
  65. mount_manager_unittest.cc
  66. mount_options.cc
  67. mount_options.h
  68. mount_options_unittest.cc
  69. mounter.cc
  70. mounter.h
  71. mounter_unittest.cc
  72. ntfs_mounter.cc
  73. ntfs_mounter.h
  74. org.chromium.CrosDisks.conf
  75. platform.cc
  76. platform.h
  77. platform_unittest.cc
  78. process.cc
  79. process.h
  80. process_unittest.cc
  81. sandboxed_process.cc
  82. sandboxed_process.h
  83. session_manager_observer_interface.h
  84. session_manager_proxy.cc
  85. session_manager_proxy.h
  86. system_mounter.cc
  87. system_mounter.h
  88. system_mounter_unittest.cc
  89. udev_device.cc
  90. udev_device.h
  91. udev_device_unittest.cc
  92. usb-device-info
  93. usb_device_info.cc
  94. usb_device_info.h
  95. usb_device_info_unittest.cc