Newsgroups: comp.sys.amiga.programmer
Path: utzoo!utgpu!watserv1!watdragon!rose!ccplumb
From: ccplumb@rose.uwaterloo.ca (Colin Plumb)
Subject: Re: trackdisk.device ETD_ stuff
Message-ID: <1991Jan26.175032.693@watdragon.waterloo.edu>
Sender: daemon@watdragon.waterloo.edu (Owner of Many System Processes)
Organization: University of Waterloo
References: <1991Jan21.193807.27609@msuinfo.cl.msu.edu>
Date: Sat, 26 Jan 91 17:50:32 GMT
Lines: 20

jap@convex.cl.msu.edu (Joe Porkka) wrote:
>In my program which diddles with the floppy disk, I do the following
>
>
>   DoIO( ETD_WRITE) /* To write out a track of data, in sectors */
>   DoIO( ETD_READ) /* To verify it made it to disk okay */
>
>The question being, do I need an ETD_UPDATE in between the
>write and the read, to force the READ to actually read from the
>disk, and not just from a track buffer in memory?

Yes, but it's "worse" than that.  ETD_UPDATE forces the data to be written,
but the track buffer remains valid.  If ETD_UPDATE returns okay, you've
got a high probability of everything being good.  To force a re-read,
you need to use (CMD|ETD)_CLEAR after the UPDATE, which invalidates
the internal buffers.  Then, a READ will have to physically access the
disk.  (Other tricks like reading something else will only work so long
as the trackdisk.device only has one track buffer.)
-- 
	-Colin
