kconfig's file handling (was: XFS: how to NOT null files on fsck?)

Chris Wedgwood cw at f00f.org
Tue Jul 13 23:28:32 BST 2004


On Tue, Jul 13, 2004 at 02:31:43PM +0200, Waldo Bastian wrote:

> There is nothing to fix, we already use a tempfile + rename, it's in
> KSaveFile since 1999. Or just look with strace if you don't believe
> me. This Tim Connors guy shouldn't talk about things he obviously
> knows nothing about.

How about fsync on the tempfile before the rename?  Without getting
into a religious discussion about whether or not this should be
necessary, it will certainly help in many cases.

> This kind of dataloss is the result of that attitude, either go
> complain with them if it bothers you, or use a filesystem that does
> it right.

I'm not sure people can just change their fs, some people have no
options and for some platforms where KDE is used there might not be
any alternatives.  I really think fsync here would help in most if not
all of those cases and it shouldn't adversely affect the performance
(to the best of my knowledge KDE doesn't update dotfiles all that
often and they are pretty small).  Other applications do this already
and it seems to be very reliable for them.



  --cw

P.S. I'm a bit confused as to why files get smashed on ENOSPC and when
     NFS servers croak though.



More information about the kde-core-devel mailing list