removing external usb hdd without unmounting causes reboot?
M. Warner Losh
imp at bsdimp.com
Sun Jul 22 02:46:27 UTC 2007
In message: <20070721110603.3878d933 at localhost>
Norberto Meijome <freebsd at meijome.net> writes:
: On Thu, 19 Jul 2007 09:02:50 -0600 (MDT)
: "M. Warner Losh" <imp at bsdimp.com> wrote:
:
: > In message: <200707190943.55428.idiotbg at gmail.com>
: > Momchil Ivanov <idiotbg at gmail.com> writes:
: > : What is then the reason for the kernel not being able to unmount a
: > : filesystem whose provider is no longer present?
: >
: > The problem is that the device driver has wound down, deallocated
: > memory, etc. Now the kernel comes along with stale references to the
: > device and panic ensues. It is really just that simple. There's no
: > replacement of the now-dead device with dead calls.
: >
: > And even if you fixed that, most of the file systems in the tree today
: > do not tolerate errors on writes at all and that also leads to
: > panics. This is why firewire freezes the I/Os rather than failing
: > them (and why umount -f on a firewire drive hangs).
:
: Please point me to the correct RTFM, because I feel this worth it :)
src/sys/fs/..., src/sys/kern/... and src/sys/vm/... are your best bets.
: Is there a reason why the kernel cannot check 'upwards' if a device
: is being used, ie mounted ? and prevent the unloading of the device
: driver ?
Check, sure, it can check. But what does a simple check accomplish if
the filesystem panics if the underlying media returns an error? The
problem isn't as simple as just looking in one place or another, but
rather systemic in nature.
Warner
More information about the freebsd-stable
mailing list