On 06/11/2011 02:03, Ori Berger wrote:
On
11/05/2011 05:12 PM, Diego wrote:
Hi list,
I am trying to debug this problem in a system I am developing:
at some point I need to write a number to a file, and then
reboot via an
external device the machine. That device will cut of the power
for a moment,
and the machine will power on again (this is to overcome a fault
we could not
overcome otherwise). Before the reboot, I "umount" the proper
partition and
then "sync".
Have you tried a sync() before the umount? I have experienced (on
older Ubuntus, may or may not be relevant to your system) that
"sync" after unmount doesn't actually do anything, whereas a
"sync" before unmount does -- perhaps it only syncs the list of
mounted filesystems.
_______________________________________________
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
umount should force a sync, although you indeed could try a sync
first if umount is buggy. Sync after umount sounds a bit useless.
Are you sure that you are waiting for the sync to actually finish
before you reboot? You could try a few seconds wait and see if
that helps as a start.
|
_______________________________________________
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il