F_FULLFSYNC
F_FULLFSYNC is a Darwin fcntl operation that synchronizes a file and requests flushing buffered drive data to permanent storage.
The operation adds a drive-cache flush request after file synchronization. It can take appreciable time; the archived manual reports ignored requests on some FireWire drives. [1]
On iOS, F_FULLFSYNC is documented as best-effort. Data can still be lost during sudden power failure. Requesting a stronger synchronization operation is not a universal guarantee of power-loss survival. [2]
SQLite separates when its VFS is synchronized from which synchronization method it requests: synchronous=FULL is not fullfsync=ON. The fullfsync setting selects F_FULLFSYNC where supported; checkpoint_fullfsync selects it for checkpoints unless fullfsync is already enabled. Both flags default off in the documentation. [3] [4] [5]
In SQLite 3.46.1, the Unix VFS full_fsync helper attempts ordinary fsync when F_FULLFSYNC returns nonzero in the HAVE_FULLFSYNC build path. If that fallback succeeds, the helper returns success. Thus a successful synchronization return does not by itself identify which operation succeeded. This is pinned source inspection, not a device test or a claim about every SQLite build. [6]
Relations
Citations
- Apple archived fcntl(2): F_FULLFSYNC
- Apple: Reducing disk writes, explicit storage synchronization
- SQLite: Synchronization Type Flags
- SQLite: fullfsync and checkpoint_fullfsync pragmas
- SQLite: checkpoint_fullfsync pragma
- SQLite 3.46.1: full_fsync Unix VFS fallback