Autoflush USB thumb drive after copy

Giles Orr gilesorr-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Fri Feb 2 17:27:08 UTC 2007


Byron,

If you're wondering why this caching system was put in place, think
back to running programs off a floppy under DOS.  Umm - assuming of
course that you ever did that.

I remember it, and coming to Linux was a revelation.  If you ran a
program off a floppy under DOS, it would usually take between 15 and
30 seconds to load.  Then if you quit the program and immediately
restarted it, it would again take 15 to 30 seconds to load.  The same
applied to loading a data file.  This was because the OS couldn't
assume it was the same file because you might have changed the floppy.
 Linux would take 15-30 seconds to load a file off a mounted floppy
the first time, but about 1 second every time thereafter.  "mount" is
an agreement between you and the OS: "I'm going to leave this media in
for a while, and I'll tell you before I remove it."  In return for
making this agreement, all your reads and writes are sped up
considerably.  I agree that remembering to "umount" stuff is initially
a pain, but it's worth it.

On 2/1/07, Byron Sonne <blsonne-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org> wrote:
> >> For performance Linux does not immediately commit writes.  It is
> >> recommended to umount, or else call sync several times to ensure full
> >> flush.
> > I would say umount is not recomended, it is mandetory.
>
> Umm... totally defeats the purpose of being USB hotpluggable, doesn't it?
>
> If it's gonna behave like that, then ls shouldn't show it as being
> present until it's committed, like my other disks. Either it's on the
> bloody stick or it's not.
>
> My OS should not lie to me, and I shouldn't have to wonder where my
> files are. Here's what should happen:
>
> 1. I copy the file.
> 2. The file is copied.
> 3. If I pull it out while it's copying, then the file gets corrupted.
> 4. Done.

-- 
Giles
http://www.gilesorr.com/
gilesorr-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list