<html style="direction: ltr;">
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<style>body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="latin-charset" bgcolor="#FFFFFF"
text="#000000">
On 06/11/2011 02:03, Ori Berger wrote:
<blockquote cite="mid:4EB5CECF.7000903@orib.net" type="cite">On
11/05/2011 05:12 PM, Diego wrote:
<br>
<blockquote type="cite">Hi list,
<br>
<br>
I am trying to debug this problem in a system I am developing:
<br>
<br>
at some point I need to write a number to a file, and then
reboot via an
<br>
external device the machine. That device will cut of the power
for a moment,
<br>
and the machine will power on again (this is to overcome a fault
we could not
<br>
overcome otherwise). Before the reboot, I "umount" the proper
partition and
<br>
then "sync".
<br>
</blockquote>
<br>
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.
<br>
<br>
_______________________________________________
<br>
Linux-il mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a>
<br>
<a class="moz-txt-link-freetext" href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a>
<br>
</blockquote>
<p>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.<br>
</p>
</body>
</html>