From kde-devel Sat Apr 19 15:11:15 2008 From: "Bart Van Assche" Date: Sat, 19 Apr 2008 15:11:15 +0000 To: kde-devel Subject: Re: fsync() madness Message-Id: X-MARC-Message: https://marc.info/?l=kde-devel&m=120861793827744 On Sat, Apr 19, 2008 at 4:44 PM, Sami Liedes wrote: > On Linux, I believe fsync() on NFS is a null op. On some other systems > it is not. This also makes some things unexpectedly slow on those > other systems, again for no good reason. > > Makes me wonder if the people who wrote this code actually understood > the difference between fflush() and fsync(). On Linux fsync() is definitely not a null op -- at least for ext2 and ext3, it syncs both the contents of the specified file and its mtime. Applications can call fsync() (or better, fdatasync()) to ensure that data is written to disk. A.o. database applications do this to when carrying out a transaction. Whether or not it is justified to call fsync() from a KDE application depends on the context. How did you figure out that fsync() gets called ? Bart. >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<