From owner-freebsd-fs@FreeBSD.ORG Sun Aug 6 03:43:01 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD38816A4DE for ; Sun, 6 Aug 2006 03:43:01 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3596943D45 for ; Sun, 6 Aug 2006 03:43:00 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [192.168.42.24] (andersonbox4.centtech.com [192.168.42.24]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id k763gx2u053781; Sat, 5 Aug 2006 22:42:59 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <44D56555.5020107@centtech.com> Date: Sat, 05 Aug 2006 22:43:17 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.5 (X11/20060802) MIME-Version: 1.0 To: Eric Anderson References: <20060803200158.61098.qmail@web30315.mail.mud.yahoo.com> <44D3A7D1.1070406@centtech.com> In-Reply-To: <44D3A7D1.1070406@centtech.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1637/Sat Aug 5 17:37:00 2006 on mh2.centtech.com X-Virus-Status: Clean Cc: freebsd-fs@freebsd.org Subject: Re: locking questions (regarding file systems) (SOLVED) 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: Sun, 06 Aug 2006 03:43:01 -0000 On 08/04/06 15:02, Eric Anderson wrote: > On 08/03/06 15:01, R. B. Riddick wrote: >> --- Eric Anderson wrote: >>> I just did, and looks like the g_vfs_close directly after the g_vfs_open >>> block (I copy-pasted) works ok. When unmounting, it then panics on >>> g_vfs_close, probably because it's already closed from before. >>> >> So the sequence: >> ... >> g_vfs_open(...); >> g_vfs_close(...); >> ... >> works fine. >> >> What r u doing between the mount and the unmount calls? >> Maybe something changes, so that ...close() deadlocks? >> >> Did u try to put debug printf's in the g_vfs_close() function? :-) > > No, I've been trying to avoid that :) > >> Or is there a program somewhere, that uses g_vfs_open/close? >> Maybe u could learn/copy&paste from hpfs? >> http://fxr.watson.org/fxr/ident?i=g_vfs_close > > I've looked at other fs's, and it's helpful, but it's a bug in my code > that is the problem. :) > > I think I know the block of code the problem is in, now I just have to > hunt it down. If I move the g_vfs_close around, I can get a panic like: > > panic: lockmgr: locking against myself Looks like I had to do this prior to the g_vfs_close: vinvalbuf(devvp, V_SAVE, td, 0, 0); That seemed to do the trick.. Thanks for all the help! Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------