GDAU100@BGUVM.BITNET ("Jonathan B. Owen") (11/17/88)
Hello. In the project I work, there is a need for certain recovery
schems. I make some updates to a file (using the ADA package
DIRECT_IO). After I perform the updates AND before I close the file,
I need to be sure that the updates were actually written to disk
and not kept in memory by Unix (read Cauching scheme).
To check this out I turn off the Apollo after the invocation of
the update routine (i.e. simulating a power failure), and regretably,
the changes are gone. Furthermore, after creating a new file, I check
that it has been added to the directory (in another process using ls).
Following the "power failure" the file is gone.
Have you run into this problem? Maybe you know of a Unix system call
which "flushes" all updated blocks to disk?
Thank you for your help,
JB
P.S. I would very much appreciate any ADA sources which use the GSR and GPR
libraries. If you are willing to send examples, please use regular
Email. Thanks again.
______________________________________________________________________________
(--) /--) /-(\ Email: gdau100@bguvm (bitnet)
\ / /--K | \|/\ /\/) /|-\ Snail: 55 Hovevei Zion
_/_/o /L__)_/o \/\__/ \X/ \_/ | |_/ Tel-Aviv, 63346 ISRAEL
(/ Jonathan B. Owen Voice: (03) 281-422
Point of view: A chicken is the means by which an egg reproduces an egg.
______________________________________________________________________________krowitz@RICHTER.MIT.EDU (David Krowitz) (11/21/88)
I don't know if there is a generic Unix system call to do what you want, but there is an IOS_$FORCE_WRITE call which is supposed to insure that the disk buffer has been written out. -- David Krowitz krowitz@richter.mit.edu (18.83.0.109) krowitz%richter@eddie.mit.edu krowitz%richter@athena.mit.edu krowitz%richter.mit.edu@mitvma.bitnet (in order of decreasing preference)