Evan Green b08ef6f98e Use fdatasync instead of O_SYNC on storage
Opening the backing files with O_SYNC makes things really slow. So slow
in fact that the modem times out after 10 seconds waiting for the last
EFS sync to go through. I think this takes forever because rmtfs is
doing 512-byte reads and writes.

One option would be to make this bigger. But a better option is to not
use O_SYNC, but explicitly do an fdatasync() after the iovec operation
is complete. This is better because 1) it's way faster, we no longer see
10-12 second delays at rebooto time, and 2) partial syncs of the EFS
file aren't useful anyway.

Use fdatasync() as opposed to fsync() since it's not important for the
metadata to be synced, just the file contents.

Signed-off-by: Evan Green <evangreen86@gmail.com>
2021-08-09 14:33:25 -07:00
2019-07-25 11:18:58 -07:00
2020-02-03 09:13:59 -08:00
2016-06-02 10:29:40 -07:00
2019-07-25 11:18:58 -07:00
2016-02-07 09:32:14 -08:00
2016-02-07 09:32:14 -08:00
Description
No description provided
BSD-3-Clause 144 KiB
Languages
C 98.4%
Makefile 1.6%