From owner-freebsd-fs@FreeBSD.ORG Thu Dec 27 22:57:52 2007 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7782016A41A for ; Thu, 27 Dec 2007 22:57:52 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 0B60013C459 for ; Thu, 27 Dec 2007 22:57:51 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-219-213.carlnfd3.nsw.optusnet.com.au (c211-30-219-213.carlnfd3.nsw.optusnet.com.au [211.30.219.213]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id lBRMvmOi004501 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 28 Dec 2007 09:57:49 +1100 Date: Fri, 28 Dec 2007 09:57:48 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Raja Sivaramakrishnan In-Reply-To: <153149.2801.qm@web90514.mail.mud.yahoo.com> Message-ID: <20071228092149.T17606@delplex.bde.org> References: <153149.2801.qm@web90514.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-fs@FreeBSD.org Subject: Re: namei lookup vnode locking 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: Thu, 27 Dec 2007 22:57:52 -0000 On Thu, 27 Dec 2007, Raja Sivaramakrishnan wrote: > Thanks for the response - I'll take a look at the handbook. > Regarding ttywait, it was not called through the ttydrain ioctl. > ttywait was called through fdfree from exit1() when the login > process was exiting. I believe this is called with the vnode > lock held. Calling device close with the vnode lock held was a large bug. It was one of the bugs fixed in 6.2 (devfs_vnops.c 1.114.2.12 2006/10/30 by kib MFC 1.136 by kib). It was broken at a higher level by locking the vnode in vn_close() starting before 6.0 (vfs_vnops.c 1.224 2005/03/13). Bruce