removing external usb hdd without unmounting causes reboot?
David Schwartz
davids at webmaster.com
Fri Jul 20 22:25:45 UTC 2007
> It won't fix it. The problem is dangling pointers to devices that no
> longer exist. And like all dangling references after 'free' you get
> bad thing happening.
> Believe me, if it were easy, it would have been fixed. If it was
> moderate to fix, it would have been fixed. It is a hard problem that
> people have put lots of hours into to try to resolve. To imply
> otherwise is really insulting to all those people (myself include)
> that have tried to fix this.
There is a simple but ugly way to fix it, similar to what the FireWire layer
does. The idea is for the USB layer to create a "device that never goes
away" when it first sees the stick and pass that "device that never goes
away" to the other layers. Even if the storage device is removed, the device
still does not go away.
The virtual device can generate errors if the physical device is missing.
The virtual device can be cleaned up when the device is unmounted. This will
ensure that the 'umount -f' process generates errors (which it will ignore)
rather than crashes (which are somewhat harder to ignore).
DS
More information about the freebsd-stable
mailing list