peter johnson wrote:
>
> Puh-leez!
> Use flush(2) after each write of critical data and the imagined disaster
> will not occur. I wonder where "decision makers" get their
> disinformation???
>
I'm a little confused here. I have never heard of flush(2).
Do you mean fsync(2) or fflush(3).
fsync(2) or fdatasync(2) might do the trick but fflush(3)
only writes standard c library buffers to the os.
Maybe fflush(3) followed by fsync(2) guarantees that
the data is really written to disk.
You will also need to take backup copies and sync them to
disk before a file is updated in case power fails in the
middle of a sync.
I have never thought about this before but it might also be
that the ext2 system is extra vulnerable to power fail
during sync. _If_ this is the case doing sync often might
not be wise...
/Fredric Fredricson
PS. Of course, that _I_ never heard of flush(2) does not
really prove anything than just that ;-).
--
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the command "unsubscribe linux-embedded" in the message body.
For more information, see <http://waste.org/mail/linux-embedded>.