From kde-core-devel Tue Jul 13 22:28:32 2004 From: Chris Wedgwood Date: Tue, 13 Jul 2004 22:28:32 +0000 To: kde-core-devel Subject: Re: kconfig's file handling (was: XFS: how to NOT null files on Message-Id: <20040713222832.GA7980 () taniwha ! stupidest ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=108987991924336 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.