OT: Mass Storage and power off

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hallo,

I'm using windows Xp Embedded SP2 on CF protected
by EWF. This works fine, i always can switch off
the computer immidiately without any problems.

But i have also a drive d: where i want to store
data. Now I've got the Problem of corrupted files and
directories. If the computer is switched off while
writing to the harddisk it may happen that the file-
system gets incorrupt (some files or folders can't
be read any more).

I also made tests with a 2,5" Flash Disk. The Flash
Disk is much better than a normal Harddisk,
but also it happened that files or folders get
incorrupt.

How do you store your data?
( Ok, this is OT but I think in this Newsgroup
are a lot of Experts to embedded Systems.
I hope it will be forgiven to me. )

Greetings Ulli
 
Ulli,

Personally I don't think the question is OT since you are working with XPe SP2.

You won't be able to eliminate the problem if you need the data files always to be saved.

A few things you can do to higher the data integrity level:
- disable the write catching on the "data" disk.
- in your app code where you do CreateFile calls for the data files, use FILE_FLAG_NO_BUFFERING and FILE_FLAG_WRITE_THROUGH
flags.
- use "temp" or "backup" file approach in your apps where you have to deal with the data files. Then you can always have present
a few previous successfully committed file save transactions that you can roll back to.
- switch to more reliable FS like NTFS
- use UPS (who likes sudden shutdowns anyway?)

=========
Regards,
KM
 
Back
Top