Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: usb flash drive removal (Re: Desktop NetBSD needs your help)

Sverre Froyen wrote:
On Wednesday 11 February 2009, Stathis Kamperis wrote:
2009/2/11 Jared D. McNeill <>:
Maybe we should add it to the Google Summer of Code project list.

It is already there:

I wonder if there is a simpler (80%) solution -- and forgive me if this has already been suggested or if it is is impractical to implement (I am only marginally familiar with the file system code).

I notice the USB devices usually (always?) contain a light that flashes while the device is being accessed -- sort of like floppy drives in the old days. This serves as a strong reminder to the user that she should not unplug the device. The issue therefore is what to do if the user unplugs an idle device. Here's my suggestion:

1) Sync a device after it has been idle for a short period. The time interval should be short so that the user does not have time to remove the device before it has been synced (say 0.2 to 0.5 sec.).

hah! I don't know about you, but I can easily unplug something less than 0.2 seconds after it's been written to. Syncing more often to removable devices would be a good thing to help keep the data consistent, but that doesn't eliminate the "device-gone-but-data-write-pending" case.

I think we can mostly get this with "mount -o sync", so from a user experience perspective the "80% solution" would be to make this the default for removable devices.


Home | Main Index | Thread Index | Old Index