Re: create()

mschw@athenet.net mschw at athenet.net
Fri Aug 30 21:21:52 PDT 2013


     I should have mentioned that I,ve only seen this on Microsoft Windows systems running filePro.  Does that make any more sense to you?  (Grin)  

Sent from my HTC cell phone

----- Reply message -----
From: "Fairlight" <fairlite at fairlite.com>
To: <filepro-list at lists.celestial.com>
Subject: create()
Date: Fri, Aug 30, 2013 8:50 pm


On Thu, Aug 29, 2013 at 09:50:53AM -0500, Mike Schwartz thus spoke:
>      Dating back to the 1980's I've had problems with hard drives and
>      hard drive controllers not completing file writes before I needed
>      to open a file.  Most likely this is due to caching problems in the
>      drive and controller firmware.  So, just closing the file doesn't
>      guarantee that it will be immediately ready to be opened.

That makes little sense as an explanation.  Here's how it goes...

High-level 4GL Language:  close()
     generally translates to:
Low-level C:  fflush(), followed by close()

Data -should- get flushed prior to close().

Once the data is flushed, the VFS layer has it, and hands it to the FS
driver.  Even if there's caching, it -should- (in a sane system) be FIFO
caching; operations take place in the same order they're requested.

Ergo, close() followed immediately by open() should always result in the
file descriptor pointing to a file with the full contents from the time of
flush/close.

If you're going to put -anything- in there, it makes sense to put:

system "sync"

....instead of sleep().  At least it would flush the disk cache pending
write operations, rather than just guessing.

But it -shouldn't- be necessary, if things are written properly.

mark->
-- 
Audio panton, cogito singularis.
_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
Subscribe/Unsubscribe/Subscription Changes
http://mailman.celestial.com/mailman/listinfo/filepro-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20130830/8ea5a534/attachment.html 


More information about the Filepro-list mailing list