<p dir="ltr">I think that sync just flushes data to disk and umount clears the dirty bit. There is no sync.vfat that I know.</p>
<div class="gmail_quote">Em 23/09/2015 05:31, "Paul D. DeRocco" <<a href="mailto:pderocco@ix.netcom.com">pderocco@ix.netcom.com</a>> escreveu:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> From: Mike Looijmans<br>
><br>
> This only serves to remove a mounted directory after<br>
> "yanking" the device. It<br>
> doesn't really do anything useful though, you'll still get corrupted<br>
> filesystems, because Linux is way too lazy in writing out dirty data.<br>
><br>
> Proper solution would be to have the system mount a removable<br>
> device as<br>
> read-only, and promote it to r/w once someone tries to write<br>
> to it. And then<br>
> after a timeout, it should go back to readonly.<br>
><br>
> Supposedly, "autofs" can accomplish this, but I've never met<br>
> anyone who got<br>
> that to actually work.<br>
<br>
In my system, the removable drive is used only for backing up or restoring<br>
various data files in response to user commands. If I do a sync after each<br>
such command, shouldn't that be enough to guarantee the file system<br>
doesn't get corrupted when the drive is removed? Will it also ensure the<br>
dirty flag is clear, or does that get set anyway?<br>
<br>
--<br>
<br>
Ciao,        Paul D. DeRocco<br>
Paul        mailto:<a href="mailto:pderocco@ix.netcom.com">pderocco@ix.netcom.com</a><br>
<br>
--<br>
_______________________________________________<br>
yocto mailing list<br>
<a href="mailto:yocto@yoctoproject.org">yocto@yoctoproject.org</a><br>
<a href="https://lists.yoctoproject.org/listinfo/yocto" rel="noreferrer" target="_blank">https://lists.yoctoproject.org/listinfo/yocto</a><br>
</blockquote></div>