Set the file-based rio object to auto-fsync every 'bytes' file written. * By default this is set to zero that means no automatic file sync is * performed. * * This feature is useful in a few contexts since when we rely on OS write * buffers sometimes the OS buffers way too much, resulting in too many * disk I/O concentrated in very little time. When we fsync in an explicit * way instead the
| 397 | * disk I/O concentrated in very little time. When we fsync in an explicit |
| 398 | * way instead the I/O pressure is more distributed across time. */ |
| 399 | void rioSetAutoSync(rio *r, off_t bytes) { |
| 400 | if(r->write != rioFileIO.write) return; |
| 401 | r->io.file.autosync = bytes; |
| 402 | } |
| 403 | |
| 404 | /* --------------------------- Higher level interface -------------------------- |
| 405 | * |
no outgoing calls
no test coverage detected