Re: [Python-Dev] Ext4 data loss
Christian Heimes wrote:
Guido van Rossum wrote:
Let's not think too Unix-specific. If we add such an API it should do something on Windows too -- the app shouldn't have to test for the presence of the API. (And thus the API probably shouldn't be called fsync.)
In my initial proposal one and a half hour earlier I suggested 'sync()' as the name of the method and 'synced' as the name of the flag that forces a fsync() call during the close operation.
Maybe it would make more sense for "synced" to force fsync() on each flush, not only on close. I'm not sure how useful it is, but that's what "synced" would imply to me. Maybe it would be best to avoid having such a variable, and expose a close_sync() method instead?
Maybe it would make more sense for "synced" to force fsync() on each flush, not only on close. I'm not sure how useful it is, but that's what "synced" would imply to me.
That should be implement by passing O_SYNC on open, rather than explicitly calling fsync. Regards, Martin
Martin v. Löwis wrote:
That should be implement by passing O_SYNC on open, rather than explicitly calling fsync.
On platforms which have it (MacOSX doesn't seem to, according to the man page). This is another good reason to put these things in the mode string. -- Greg
participants (3)
-
"Martin v. Löwis" -
Greg Ewing -
Hrvoje Niksic