From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 17 23:06:36 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDADB16A419 for ; Mon, 17 Dec 2007 23:06:36 +0000 (UTC) (envelope-from fbsd-hackers@mawer.org) Received: from outbound.icp-qv1-irony-out4.iinet.net.au (outbound.icp-qv1-irony-out4.iinet.net.au [203.59.1.150]) by mx1.freebsd.org (Postfix) with ESMTP id 6CCF313C465 for ; Mon, 17 Dec 2007 23:06:36 +0000 (UTC) (envelope-from fbsd-hackers@mawer.org) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAANuIZkfLzq3r/2dsb2JhbAAIqmw X-IronPort-AV: E=Sophos;i="4.24,178,1196607600"; d="scan'208";a="141395154" Received: from unknown (HELO [10.24.1.1]) ([203.206.173.235]) by outbound.icp-qv1-irony-out4.iinet.net.au with ESMTP; 18 Dec 2007 07:37:07 +0900 Message-ID: <4766F9E3.9070304@mawer.org> Date: Tue, 18 Dec 2007 09:36:19 +1100 From: Antony Mawer User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Peter Jeremy References: <1197889622.4766585626a92@webmail.rawbw.com> <20071217180921.GM85797@server.vk2pj.dyndns.org> In-Reply-To: <20071217180921.GM85797@server.vk2pj.dyndns.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Yuri , freebsd-hackers@freebsd.org Subject: Re: Stale mount on disconnected device: how to delete it? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2007 23:06:36 -0000 On 18/12/2007 5:09 AM, Peter Jeremy wrote: > On Mon, Dec 17, 2007 at 03:07:02AM -0800, Yuri wrote: >> I had USB camera connected and recognized as umass0 and mounted as /mnt/camera >> on /dev/da0s1. >> >> Camera was disconnected while it was still mounted. > > This triggers known and extremely painful to fix bugs in FreeBSD. > Your best work-around is to use ports/emulators/mtools rather than > mount_msdosfs to to access removable devices. Every time this comes up it's branded with the "really hard to fix" message, but I seem to recall the last time this came up Matt Dillon chimed in and said he'd managed to fix it in Dragonfly without too much pain. I had a browse back a while ago at the commits on DF to try and pinpoint the changes that were required to see how practical they were to bring across to FreeBSD; I don't profess to be an expert and have yet to investigate the changes in any detail, but these were the commits I identified: http://freshbsd.org/2007/06/14/03/55/27 http://freshbsd.org/2007/06/17/06/08/52 http://freshbsd.org/2007/06/14/02/09/30 http://freshbsd.org/2007/06/13/21/58/38 http://freshbsd.org/2007/06/13/21/53/39 If someone else is interested in looking at this, it may provide a useful starting point... --Antony