Re: Preventing delayed USB writes
On May 17, 8:50 pm, Douglas Allan Tutty <dtu...@porchlight.ca> wrote:
> On Tue, May 15, 2007 at 01:52:15PM -0700, pedxing wrote:
> > > > I would like
> > > > to configure things so that, for instance, when I (ok, actually my
> > > > wife) use konqueror to copy songs to my mp3 player, when the copy
> > > > dialog says 100%, I can immediately unmount the device without
> > > > having to wait for a delayed write.
>
> > Does anyone know if this problem (excessive writes to the FAT with the
> > sync option enabled) has been addressed in more recent kernels?
> > Or does everyone just suck it up and wait huge amounts of time for
> > USB media to "safely remove"?
>
> Are "excessive" writes to the FAT with sync a problem for the kernel to
> fix? I thought it was a design flaw of the filesystem.
The (2-year old) discussion of this topic that everyone references
(http://www.uwsg.iu.edu/hypermail/linux/kernel/0505.1/1261.html) seems
to indicate that it is a kernel (O_SYNC) issue. One poster (Denis
Vlasenko) proposes an O_LAZY_SYNC to address the issue. I don't know
exactly what O_SYNC is.
What I'm really curious about is whether or not this has been
addressed or overcome by events in the two years since that
discussion.
> To me, ideally, nothing would be written to the flash at all until
> either sync or umount. Yes, I wait.
Yes, I also wait. Because KDE doesn't give the user any indication of
how long to wait, the user has to drop to a terminal, run a sync
command, and wait for the prompt to come back to get any indication of
when it is ok to remove.
> > I would rather not experiment on my wife's new mp3 player, but it
> > would
> > be a pain to force her to the command line every time she wants to
> > transfer music to it...
>
> Why not create a button that runs the one command you want?
I'm not looking for a command, I already have a command (sync).
I was hoping there would be a way to tell the system to *sanely* keep
the writes synced, say after each file is closed instead of either not
syncing until umount or the other extreme of syncing after every block
is written.
I would like to be able to configure the system so that when KDE says
that it has finished writing the file, it is finished writing the
file, and I can do a "safely remove" without getting an error message
and having to wait some indeterminate period before trying again.
Oh, and I want a cookie, too.
-Ped
Reply to: