From owner-freebsd-fs@FreeBSD.ORG  Thu Aug  3 19:36:49 2006
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
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 C406116A4DF
	for <freebsd-fs@freebsd.org>; Thu,  3 Aug 2006 19:36:49 +0000 (UTC)
	(envelope-from arne_woerner@yahoo.com)
Received: from web30308.mail.mud.yahoo.com (web30308.mail.mud.yahoo.com
	[68.142.200.101])
	by mx1.FreeBSD.org (Postfix) with SMTP id 42BB443D80
	for <freebsd-fs@freebsd.org>; Thu,  3 Aug 2006 19:36:34 +0000 (GMT)
	(envelope-from arne_woerner@yahoo.com)
Received: (qmail 91251 invoked by uid 60001); 3 Aug 2006 19:36:33 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com;
	h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding;
	b=BJnF6fPqnEfV4Ji5FDTI1QaiISXFMiAM7+1yDlVMPG0a2TuynMPSuW9DisJLi3h6TwGUu0GO0T7n2MXjwCOOGySY7+o/MrUONdSnz9VwJmLKz/KxyF6wQ3dtIuJ7uo3UFlgvZKfpEv5iPnCdu658c9mNUA2g2rs7N9gxh5dCyOs=
	; 
Message-ID: <20060803193633.91249.qmail@web30308.mail.mud.yahoo.com>
Received: from [213.54.80.200] by web30308.mail.mud.yahoo.com via HTTP;
	Thu, 03 Aug 2006 12:36:33 PDT
Date: Thu, 3 Aug 2006 12:36:33 -0700 (PDT)
From: "R. B. Riddick" <arne_woerner@yahoo.com>
To: Eric Anderson <anderson@centtech.com>
In-Reply-To: <44D23CAA.10907@centtech.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Cc: freebsd-fs@freebsd.org
Subject: Re: locking questions (regarding file systems)
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 03 Aug 2006 19:36:49 -0000

--- Eric Anderson <anderson@centtech.com> wrote:
> On 08/03/06 01:14, R. B. Riddick wrote:
> > --- Eric Anderson <anderson@centtech.com> wrote:
> >> # here use_count is 1
> >> 	error = vflush(mp, 1, flags, td);
> >> 	if (error)
> >> 		return (error);
> >> 		
> >> 	DROP_GIANT();
> >> 	g_topology_lock();
> >> # this is where the use_count is now zero, and it blocks
> >> 	g_vfs_close(cp, td);
> >> 	g_topology_unlock();
> >> 	PICKUP_GIANT();
> >> 	vrele(devvp);
> >> 	
> >> Is it blocking because the use_count is already 0?  Is the vflush 
> >> breaking things?
> >>
> >>From the man page of vflush() I would guess, that u call it too early or
> > unnecessarily...
> > 
> > My feeling says: Open & Close it... ;-)
> > 
> > Hmm... Did u try to run without vflush() and vrele()? :-)
> 
> I've tried getting rid of the vrele and vflush, and that doesn't help.
>
Hmm... So the g_vfs_close() always deadlocks with and without vflush()?
That is strange... I mean: When I open a regular file, I can close it...

Did u try to call g_vfs_close() immediately after the g_vfs_open()?

> Any other ideas?  I have to be missing something very simple here..
> 
Yes. Most likely it is something simple and orthogonal, because: Humans often
have similar ideas of "simple"... ;-)

-Arne


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com