4 ms·
sync_file_range is different to fsync, fdatasync and O_DSYNC in that it does not flush the disk write cache (whereas the latter explicitly do on newer kernels):
by jorangreef 9y ago
sync_file_range is different to fsync, fdatasync and O_DSYNC in that it does not flush the disk write cache (whereas the latter explicitly do on newer kernels):
https://linux.die.net/man/2/sync_file_range https://linux.die.net/man/2/sync_file_range:
This system call does not flush disk write caches and thus does not
provide any data integrity on systems with volatile disk write caches.
- blattimwind 9y agoHence "sync_file_range combined with fdatasync". sfr is only useful to get the kernel to start the write-out now.