From owner-freebsd-current Thu Sep 12 9:43:48 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 575B937B400; Thu, 12 Sep 2002 09:43:46 -0700 (PDT) Received: from harrier.mail.pas.earthlink.net (harrier.mail.pas.earthlink.net [207.217.120.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12E5843E6E; Thu, 12 Sep 2002 09:43:46 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0459.cvx22-bradley.dialup.earthlink.net ([209.179.199.204] helo=mindspring.com) by harrier.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17pX46-0003FB-00; Thu, 12 Sep 2002 09:43:39 -0700 Message-ID: <3D80C3FD.EE87B20D@mindspring.com> Date: Thu, 12 Sep 2002 09:42:37 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Ian Dowse Cc: Don Lewis , current@FreeBSD.ORG, jeff@FreeBSD.ORG Subject: Re: nfs_inactive() bug? -> panic: lockmgr: locking against myself References: <200209121615.aa61506@salmon.maths.tcd.ie> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Ian Dowse wrote: > And I've just remembered a fifth :-) I think the old BSD code had > both an `open' count and a reference count. The open count is a > count of the real users of the vnode (it is what ufs_inactive really > wants to compare against 0), and the reference count is just for > places that you don't want the vnode to be recycled or destroyed. > This was probably lost when the encumbered BSD sources were rewritten. No, this went away with the vnode locking changes; it was in the 4.4 code, for sure. I think references are the correct thing here, and SunOS seems to agree, since that's how they implement, too. 8-). > At the time I was looking at it last, I remember thinking that the > open count would allow vrele/vput to keep the reference count at 1 > during the VOP_INACTIVE() call, which is what you were proposing. > It would also allow us to fix the problem of many places not matching > each VOP_OPEN() with a VOP_CLOSE(). I suspect we could clean up a > lot of related problems if the open count was brought back. Yes. It was murdered for good reason. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message