USB memory stick hotswap problems

M. Warner Losh imp at bsdimp.com
Sun Sep 26 13:41:36 PDT 2004


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



More information about the freebsd-current mailing list