From owner-freebsd-current@FreeBSD.ORG Sun Sep 26 00:59:44 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9CA2A16A4E3 for ; Sun, 26 Sep 2004 00:59:44 +0000 (GMT) Received: from mail.parodius.com (mail.parodius.com [64.62.145.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7EC1143D5C for ; Sun, 26 Sep 2004 00:59:44 +0000 (GMT) (envelope-from jdc@pentarou.parodius.com) Received: from pentarou.parodius.com (jdc@localhost [127.0.0.1]) by mail.parodius.com (8.13.1/8.13.1) with ESMTP id i8Q0xhpO061400 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 25 Sep 2004 17:59:43 -0700 (PDT) (envelope-from jdc@pentarou.parodius.com) Received: (from jdc@localhost) by pentarou.parodius.com (8.13.1/8.13.1/Submit) id i8Q0xhgI061399 for freebsd-current@freebsd.org; Sat, 25 Sep 2004 17:59:43 -0700 (PDT) (envelope-from jdc) Date: Sat, 25 Sep 2004 17:59:43 -0700 From: Jeremy Chadwick To: freebsd-current@freebsd.org Message-ID: <20040926005943.GA61350@parodius.com> Mail-Followup-To: freebsd-current@freebsd.org References: <41555396.4030009@fer.hr> <20040925132430.C65556@carver.gumbysoft.com> <20040926021347.721a025f.benlutz@datacomm.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040926021347.721a025f.benlutz@datacomm.ch> User-Agent: Mutt/1.5.6i Subject: Re: USB memory stick hotswap problems X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Sep 2004 00:59:44 -0000 Can't usbd (or better yet, usbd.conf) be modified or changed in some way to automatically handle the unmounting of any existing filesystems that match the device which is mounted? Seems like we're eventually going to need this to make hot-swappable USB devices more friendly. I understand why you must unmount a device before SCSI CAM gets disconnected from it, but it just seems that this should be a job for usbd. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. | On Sun, Sep 26, 2004 at 02:13:47AM +0200, Benjamin Lutz wrote: > > panic. > > > > You must unmount volumes before removing them from the system. Otherwise > > there is unflushed dirty data that will get lost, causing data > > corruption on the volume. You will get a panic since the system doesn't > > know what to do with the data and wants to avoid causing any further > > damage. > > Seems that in this case panicing does more damage, instead of of just the > not yet flushed data on the usb stick, you lose everything you've just > been working on that's not yet been saved to disk. > > Sure, it probably does wonders for user education... > > Seriously though, can't this be changed? When I find myself in the > situation of having unplugged my usb stick, it appears there's nothing I > can do to rectify the situation, except ignore the mounted file system. > Not exactly a comfortable position for a unix system admin. > > Unfortunately, I'm not a kernel hacker. > > Benjamin