Re: USB memory stick hotswap problems

From: Lucas James <Lucas.James_at_LDJcs.Com.Au>
Date: Sun, 26 Sep 2004 10:36:44 +0930
On Sun, 26 Sep 2004 10:29 am, Jeremy Chadwick wrote:
> Can't usbd (or better yet, usbd.conf) be modified or changed in some way
> to automatically handle the unmounting of any existing filesystems that
> match the device which is mounted?

that won't work because usbd only gets the notification of something being 
unplugged *after* the fact, and it's too late to do unmounting then.

And it can't be modified, because the kernel has no idea when the user is 
going to yank out the cable.

> Seems like we're eventually going to need this to make hot-swappable USB
> devices more friendly.  I understand why you must unmount a device
> before SCSI CAM gets disconnected from it, but it just seems that this
> should be a job for usbd.

the only way you can ensure data integrity on user-removable devices is to 
mount them with -o sync.

We should be telling the kernel at some point that this is a removable device, 
and not have the kernel complain if we umount it when the device has already 
disappeared (assuming that we have mounted it with -o sync).


Lucas James
-- 
The only possible interpretation of any research whatever in the
`social sciences' is: some do, some don't.
  -- Ernest Rutherford

Received on Sat Sep 25 2004 - 23:15:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:14 UTC