From owner-freebsd-fs@FreeBSD.ORG Thu Feb 22 15:40:00 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 A580216A402; Thu, 22 Feb 2007 15:40:00 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id 1356613C4A3; Thu, 22 Feb 2007 15:39:59 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (shkjof@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id l1MFd0xe075916; Thu, 22 Feb 2007 16:39:05 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id l1MFd0Vr075915; Thu, 22 Feb 2007 16:39:00 +0100 (CET) (envelope-from olli) Date: Thu, 22 Feb 2007 16:39:00 +0100 (CET) Message-Id: <200702221539.l1MFd0Vr075915@lurza.secnetix.de> From: Oliver Fromme To: freebsd-fs@FreeBSD.ORG, bjoern.koenig@alpha-tierchen.de, anderson@FreeBSD.ORG In-Reply-To: <45DDAE70.8010508@alpha-tierchen.de> X-Newsgroups: list.freebsd-fs User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Thu, 22 Feb 2007 16:39:05 +0100 (CET) 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 Reply-To: freebsd-fs@FreeBSD.ORG, bjoern.koenig@alpha-tierchen.de, anderson@FreeBSD.ORG List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Feb 2007 15:40:00 -0000 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 -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart Any opinions expressed in this message are personal to the author and may not necessarily reflect the opinions of secnetix GmbH & Co KG in any way. FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "Being really good at C++ is like being really good at using rocks to sharpen sticks." -- Thant Tessman