Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
From: Alexander Bluhm (bluhmcvs.openbsd.org)
Date: Sat Sep 15 2007 - 14:22:18 CDT
Module name: src
Changes by: bluhmcvs.openbsd.org 2007/09/15 13:22:18
sys/dev/usb : umass.c
sys/scsi : sdvar.h sd.c
sys/kern : vfs_default.c vfs_subr.c
Allow to pull out an usb stick with ffs filesystem while mounted
and a file is written onto the stick. Without these fixes the
machine panics or hangs.
The usb fix calls the callback when the stick is pulled out to free
the associated buffers. Otherwise we have busy buffers for ever
and the automatic unmount will panic.
The change in the scsi layer prevents passing down further dirty
buffers to usb after the stick has been deactivated.
In vfs the automatic unmount has moved from the function vgonel()
to vop_generic_revoke(). Both are called when the sd device's vnode
is removed. In vgonel() the VXLOCK is already held which can cause
a deadlock. So call dounmount() earlier.
ok krw, I like this marco, tested by ian