Re: fsync in glib/gio
- From: "Freddie Unpenstein" <fredderic excite com>
- To: gtk-devel-list gnome org,bjt23 cornell edu
- Subject: Re: fsync in glib/gio
- Date: Sun, 15 Mar 2009 00:28:10 -0400
From: "Brian J. Tarricone", Date: 15/03/2009 07:31
> That sounds pretty awful, to me, to be honest. So every FS -- no, wait
> -- every FS that's going to be pushed as a "mainstream" FS -- is going
> to have to be closely monitored to make sure it doesn't have this
> behavior? Everyone's going to be putting little band-aids over this
> issue, but only in FSes we "care about?" The underlying issue, the
> root cause -- that the spec allows what many consider very unsafe
> behavior -- is just going to be ignored?
In the absense of a "sync this file" or "do this / tell me after file safely sync'd" call, it's the next best thing. The ability to "stack" file system operations and/or obtain completion status would probably be a much better way of dealing with this. A quick at-exit cleanup routine could check for completion of a two-step save-and-rename operation, and force a flush if not, etc.
Although, the idea of "ordered" operations does seem to suggest that something like this WOULD be considered. Making sure it's writing the data for a file before using it to overwrite another file, does seem fairly "in order" to me, and seems like rather a bit of a glaring omission from any FS's that don't. I've always just kind of assumed that they WOULD do that.
I've got a generally pretty damn slow system, and a fair bit of file system activity going on, including an unwholesome amount of swapping. I'd really rather now have a bunch of unneccesary sync's going on. We have probably four or five power failures a year, and I've yet to loose anything, even on the old FAT partition. I, for one, don't want this being pushed on me. If it's a problem, I'll change my file system settings to make them safer, or look to another file system that is.
Fredderic
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]