Temporary files: RAM or disk?
Temporary files: RAM or disk?
Posted Jun 4, 2012 11:20 UTC (Mon) by neilbrown (subscriber, #359)In reply to: Temporary files: RAM or disk? by andresfreund
Parent article: Temporary files: RAM or disk?
O_SYNC means every write request is safe before the write system call returns.
An alternate semantic is that a file is safe once the last "close" on it returns. I believe this has been implemented for VFAT filesystems which people sometimes like to pull out of their computers without due care.
It is quite an acceptable trade-off in that context.
This is nearly equivalent to always calling fsync() just before close().
Adding a generic mount option to impose this semantic on any fs might be acceptable. It might at least silence some complaints.