Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: How to safely maintain a status file

Reply
Thread Tools

Re: How to safely maintain a status file

 
 
Steven D'Aprano
Guest
Posts: n/a
 
      07-13-2012
On Thu, 12 Jul 2012 15:05:26 +0200, Christian Heimes wrote:

> You need to flush the data to disk as well as the metadata of the file
> and its directory in order to survive a system crash. The close()
> syscall already makes sure that all data is flushed into the IO layer of
> the operating system.


And some storage devices (e.g. hard drives, USB sticks) don't actually
write data permanently even when you sync the device. They just write to
a temporary cache, then report that they are done (liar liar pants on
fire). Only when the cache is full, or at some random time at the
device's choosing, do they actually write data to the physical media.

The result of this is that even when the device tells you that the data
is synched, it may not be.


--
Steven
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How to safely maintain a status file Plumo Python 1 07-12-2012 05:46 PM
Re: How to safely maintain a status file Plumo Python 1 07-09-2012 08:47 PM
Re: How to safely maintain a status file Laszlo Nagy Python 1 07-09-2012 08:57 AM
Re: How to safely maintain a status file Dennis Lee Bieber Python 1 07-09-2012 05:58 AM
How to safely maintain a status file Richard Baron Penman Python 0 07-08-2012 11:29 AM



Advertisments