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

List:       kde-devel
Subject:    Re: ktempfile
From:       Luciano Montanaro <mikelima () cirulla ! net>
Date:       2007-10-18 15:49:42
Message-ID: 200710181749.42619.mikelima () cirulla ! net
[Download RAW message or body]

Il Thursday 18 October 2007 17:22:55 Thiago Macieira ha scritto:
> Em Thursday 18 October 2007 16:07:57 Jaison Lee escreveu:
> > If KConfig could me
> > be made to sync() in the background this issue goes away. Is someone
> > willing to look into this?
>
> Even if you do it in a thread, the whole system syncs. It's not a question
> of whether the GUI is responsive or not -- it's a question of whether
> there's a lot of disk I/O.
>
> In the ideal world, I wouldn't recommend syncing at all: if you have a
> power loss, your data is corrupted and we can't do much about it. But I do
> remember lots of complaints by users in bugs.kde.org about this issue,
> which is probably why the sync was introduced in the first place.
>
> What I don't know is why our config files are more susceptible to
> corruption than other files. Is it the way we save (KSaveFile: write,
> atomically rename)?

Actually, I'm not sure why we should sync configuration files in particular, 
and not other files... and fsync just ends transferring the ram buffers to 
the disk buffers.

I think the problem with config files is not as much that they become corrupt, 
but that applications crash because of that. So fsyncing them may alleviate 
the pain, but it's not a real solution... 

The real solution would be checking what is read from the config file makes 
sense, warn the user about it, and use a default value to continue.

Luciano
 
>> 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