[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: fsync() madness
From:       "Bart Van Assche" <bart.vanassche () gmail ! com>
Date:       2008-04-19 15:11:15
Message-ID: e2e108260804190811m7d35141ep754ea72bee1c3534 () mail ! gmail ! com
[Download RAW message or body]

On Sat, Apr 19, 2008 at 4:44 PM, Sami Liedes <sliedes@cc.hut.fi> 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 <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic