When is fsync() called for ext4/XFS writes?

There are warnings regarding default Linux file system caching/block management failing to write permanently until I/O is complete. e.g:

Delayed allocation and other performance optimizations affect XFS the same way that they do ext4. Namely, a program’s writes to an XFS file system are not guaranteed to be on-disk unless the program issues an fsync() call afterwards.[/quote]

When does Xojo make this happen so that the write becomes rock-solid persistent? output.flush? output.close? Never so make our own API call?

Thanks in advance

From my years of using RB/RS/Xojo on Linux, it’s called on close. It has nothing to do with the filesystem type in use that I can see. We use XFS for all of our systems, and I’ve never witnessed an instance when my data hasn’t been written to the disk.

One note, if I am writing for a long period such as log entries in a long running app, I open and close the file after each atomic write.

Thanks Tim, that sounds encouraging.
Is there any definitive answer in the docs?
I need to be able to show due diligence and I don’t know how to watch API calls on Linux…

Not that I know of, but I’m sure the Xojo team could pipe in. Or, send a note to support@xojo.com so that it’s directly on their radar.