Re: USB memory stick hotswap problems

From: M. Warner Losh <imp_at_bsdimp.com>
Date: Sun, 26 Sep 2004 14:41:40 -0600 (MDT)
In message: <20040926182113.7ccffc2c.benlutz_at_datacomm.ch>
            Benjamin Lutz <benlutz_at_datacomm.ch> writes:
: > 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).
: 
: Even if it's mounted async, the kernel should just shrug, flush the now
: useless stuff from memory, and get on with it's live. Maybe a log entry
: could be made when there's still unwritten data that has now been lost.
: 
: I'm anxious to see what phk comes up with :)

There's multiple problems with devices going away.  In this case,
there kernel has references to the device that goes away and tries to
flush its buffers to the now defunt device.  Bad kharma ensues.  phk's
device work should help this somewhat, but there aren't any sleepers,
per se, in this case, so I'll be very interested to see how he deals
with that issue.

Warner
Received on Sun Sep 26 2004 - 18:41:36 UTC

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