Re: fsync in glib/gio



Hi!

> > > I think you don't understand the problem.
> > 
> > That might very well be the case. I had a look at the presentation that
> > Alex linked to in the initial post in this thread. But I would have
> > preferred a document that doesn't look at the issue from a database
> > developer point of view.
> 
> Here is a comment from the "save file" point of view.
> https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/317781/comments/54
> 
> > It seems wrong to work around broken file-systems on the application
> > level. That only takes away pressure from the file-system developers to
> > address the problem properly.
> 
> I don't disagree, but on the other hand. Users are losing data as we
> speak. (See above ubuntu bug report)

It got fixed in ext4...

> One compromise we could make it to only fsync in the case we're actually
> overwriting an existing file. This would mean that we don't risk
> loosing

You should fsync just before doing rename, preferably in some special
way so that we can tell it apart from 'normal' fsync.

If you are overwriting files with truncate.... that is broken and
always was. You need to use rename. 
							Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]