[Python-Dev] Ext4 data loss

Cameron Simpson cs at zip.com.au
Wed Mar 11 04:02:12 CET 2009


On 11Mar2009 02:20, Antoine Pitrou <solipsis at pitrou.net> wrote:
| Christian Heimes <lists <at> cheimes.de> writes:
| > I agree with you, fsync() shouldn't be called by default. I didn't plan
| > on adding fsync() calls all over our code. However I like to suggest a
| > file.sync() method and a synced flag for files to make the job of
| > application developers easier.
| 
| We already have os.fsync() and os.fdatasync(). Should the sync() (and
| datasync()?) method be added as an object-oriented convenience?

I can imagine plenty of occasions when there may not be an available
file descriptor to hand to os.fsync() et al. Having sync() and
datasync() methods in the object would obviate the need for the caller
to know the object internals.
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

I must construct my own System, or be enslaved to another Man's.
        - William Blake


More information about the Python-Dev mailing list