Re: fsync in glib/gio
- From: Alexander Larsson <alexl redhat com>
- To: Pavel Machek <pavel ucw cz>
- Cc: gtk-devel-list gnome org, Sven Neumann <sven gimp org>
- Subject: Re: fsync in glib/gio
- Date: Tue, 24 Mar 2009 10:30:52 +0100
On Tue, 2009-03-24 at 10:01 +0100, Pavel Machek wrote:
> > > 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...
Yes, but not in e.g. XFS.
> > 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.
This is what I mean of course. And there is no such "special way"
> If you are overwriting files with truncate.... that is broken and
> always was. You need to use rename.
] [Thread Prev