usb/84336: [usb] [reboot] instant system reboot when unmounting a powered off/unplugged+replugged USB device

M. Warner Losh imp at bsdimp.com
Sat Jan 26 19:43:52 PST 2008


In message: <20080127032955.GI53741 at server.vk2pj.dyndns.org>
            Peter Jeremy <peterjeremy at optushome.com.au> writes:
: On Sat, Jan 26, 2008 at 12:54:54PM +0100, Henrik Gulbrandsen wrote:
: >At this point, only the file systems need to be updated. The cleanest
: >way to handle things may be to have GEOM automatically unmount them at
: >orphaning. Until that's done, however, unmounting from user space via
: >devd seems to be a reasonable approach.
: 
: This approach doesn't work because GEOM doesn't know the drive has
: gone away until it's no longer present.  At that point it's too late
: to write unflushed buffers.  And a devfs-triggered forced unmount does
: not address the issue of in-flight I/O's between when the media goes
: away and the filesystem is unmounted.
: 
: This problem is one of a number of problems within FreeBSD where there
: is a disconnect between the people who want the problem solved and those
: with the skills to actually solve the problem.  This is a side-effect of
: FreeBSD being a volunteer project and it's not clear how to fix this.

One of the things that I've been working on with someone (whose name
escapes me) and Bruce Evans is trying to address these issues.  One
problem we have today is that when the device return ENXIO, the buffer
cache retries the operation rather than failing it upstream.  There
are a number of issues with doing this, including fixing all the
filesystems to cope with errors.  I've committed a number of 'keep the
system from panicing' type fixes, but much works remains to be done.

And my time this month is very limited, as will next month's because
work is being insane.

Warner


More information about the freebsd-usb mailing list