Hi,
Since no-one has jumped in I'll have a go.
>From: "Christopher E. Brown" <[EMAIL PROTECTED]>
> You want to look at running with the disk read only, or
>running from a ramdisk.
I strongly agree!
> For what you are talking about now, at sync after defaults in
>fstab, ie
>
>/dev/hda3 / ext2 defaults,sync
>
>This will sync mount the entire partition.
But this may not be what you want! It should complete each write of each
page/block. It will leave the *file* in a known state (good for journal'd
fs) but probably unuseable state (only part of the file is rewritten).
see man mount:
sync All I/O to the file system should be done
synchronously.
This can be very slow and *this* also makes it statistically more likely
that your file is trashed.
Also if you are using a flash device many write cycles per file can soon
complete its useful life (limited no of write cycles).
>On Wed, 2 Feb 2000, Jeff Pierce wrote:
>> I asked somebody recommended chattr, but this is for a single file. I
>> want it disabled completely so when a file is written and closed it is
>> done IMMEDIATELY.
>>
see man close
NOTES
Not checking the return value of close is a common but
nevertheless serious programming error. File system
implementations which use techniques as ``write-behind''
to increase performance may lead to write(2) succeeding,
although the data has not been written yet. The error
status may be reported at a later write operation, but it
is guaranteed to be reported on closing the file. Not
checking the return value when closing the file may lead
to silent loss of data. This can especially be observed
with NFS and disk quotas.
Do not be confused that Linux keeps the file in cache after a write
so that another *read* can access it without touching a disk.
>> This, I believe is necessary in an embedded system that is started and
>> shutdown via the power switch.
Use a ramdisk, then you *know* what happens, it goes unless you save it.
Peter
--
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>.