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

List:       kde-core-devel
Subject:    Re: kconfig's file handling (was: XFS: how to NOT null files on
From:       Chris Wedgwood <cw () f00f ! org>
Date:       2004-07-13 22:28:32
Message-ID: 20040713222832.GA7980 () taniwha ! stupidest ! org
[Download RAW message or body]

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.
[prev in list] [next in list] [prev in thread] [next in thread] 

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