Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!batcomputer!itsgw!steinmetz!zephyrus!dixon
From: dixon@zephyrus.steinmetz (Walter V. Dixon)
Newsgroups: comp.sys.ibm.pc
Subject: Re: disk updates and power failures
Message-ID: <11478@steinmetz.ge.com>
Date: 8 Jul 88 02:26:47 GMT
References: <472@apctrc.UUCP>
Sender: news@steinmetz.ge.com
Reply-To: dixon@zephyrus.UUCP (Walter V. Dixon)
Organization: General Electric CRD, Schenectady, NY
Lines: 33

Newsgroups: comp.sys.ibm.pc
Subject: Re: disk updates and power failures
Summary: 
Expires: 
References: <472@apctrc.UUCP>
Sender: 
Reply-To: dixon@zephyrus.UUCP (Walter V. Dixon)
Followup-To: 
Distribution: 
Organization: General Electric CRD, Schenectady, NY
Keywords: 

There are two levels of buffering.  The C run time maintains internal
buffers and dos also maintains a buffer of disk blocks.  Most C run
time libraries provide a mechanism for flushing the C buffers.  DOS
uses its buffer cache for fat and directory blocks;  the buffer cache
is also used for reading PARTIAL blocks.  When a file is closed
DOS may update the directory entry from information contained in
SFT (see followup to 19371).  The directory entry is marked dirty
and then all dirty blocks are flushed from the cache.

At any time issuing a disk reset forces a cache flush,  but the
directory entry may not get updated.  Duplicating a handle
and then closing the file will update the directory entry and
flush the buffer cache.

I hope this helps.

Walt Dixon		{ARPA	: dixon@ge-crd.com     }
			{US Mail: GE CRD               }
			{	  PO Box 8             }
			{	  Schenectady NY 12345 }
			{Phone	: 518-387-5798         }