From owner-freebsd-fs@FreeBSD.ORG Thu Feb 22 17:23:53 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4291A16A401 for ; Thu, 22 Feb 2007 17:23:53 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.freebsd.org (Postfix) with ESMTP id 1898613C49D for ; Thu, 22 Feb 2007 17:23:52 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id l1MHMfX8091770; Thu, 22 Feb 2007 11:22:41 -0600 (CST) (envelope-from anderson@freebsd.org) Message-ID: <45DDD166.4060606@freebsd.org> Date: Thu, 22 Feb 2007 11:22:46 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5.0.9 (X11/20070204) MIME-Version: 1.0 To: freebsd-fs@freebsd.org, bjoern.koenig@alpha-tierchen.de References: <200702221539.l1MFd0Vr075915@lurza.secnetix.de> In-Reply-To: <200702221539.l1MFd0Vr075915@lurza.secnetix.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/2628/Thu Feb 22 05:31:25 2007 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Cc: Subject: Re: The patch delete no umount eject flash disk freebsd panic X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Feb 2007 17:23:53 -0000 On 02/22/07 09:39, Oliver Fromme wrote: > Recently I had an idea to solve (or work around) the problem > in a completely different way, using FUSE. > > With FUSE it would be possible (and quite simple, in fact) > to implement an msdosfs-like file system as a userland > daemon. The daemon could be started during boot and run > until shutdown, i.e. the mount would exist all the time. > You could insert and remove USB sticks, compact flash cards > and other removable FAT media at will, without having to > mount or umount. If you remove the device, the files would > simply disappear from the mountpoint. Any files still open > by processes would have to return some sensible error code > (maybe EBADF or ESTALE). > > The actual code for the daemon could be borrowed from the > kernel's msdosfs, or from mtools (ports/emulators/mtools). > > Unfortunately I don't have sufficient time right now for > doing it myself. But if someone picks up that idea and > implements it, it would be quite useful. Using FUSE isn't > difficult, bascially you have to link against the library > and implement handlers for a number of file system related > functions (lookup, read, write etc.). Since it runs > entirely in userland, there's no danger of kernel panics, > and debugging is quite simple. > > Maybe something for the FreeBSD ideas web page ...? > > Best regards > Oliver > Honestly, I think the OS should do this, not an external userland tool. Having a FUSE module handle this, to me, is a bandaid for the right solution. I'm not claiming I know the solution yet, but I know it should be a built-in. Eric