Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jan 2008 20:40:38 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        peterjeremy@optushome.com.au
Cc:        freebsd-usb@freebsd.org, oliver@freebsd.org
Subject:   Re: usb/84336: [usb] [reboot] instant system reboot when unmounting a powered off/unplugged+replugged USB device
Message-ID:  <20080126.204038.2076808019.imp@bsdimp.com>
In-Reply-To: <20080127032955.GI53741@server.vk2pj.dyndns.org>
References:  <200801260034.m0Q0YVVD012819@freefall.freebsd.org> <1201348494.2277.96.camel@Particle> <20080127032955.GI53741@server.vk2pj.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20080127032955.GI53741@server.vk2pj.dyndns.org>
            Peter Jeremy <peterjeremy@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080126.204038.2076808019.imp>