From owner-freebsd-fs Thu Apr 16 22:00:17 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA18082 for freebsd-fs-outgoing; Thu, 16 Apr 1998 22:00:17 -0700 (PDT) (envelope-from owner-freebsd-fs@FreeBSD.ORG) Received: from parkplace.cet.co.jp (parkplace.cet.co.jp [202.32.64.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA18058; Fri, 17 Apr 1998 05:00:04 GMT (envelope-from michaelh@cet.co.jp) Received: from localhost (michaelh@localhost) by parkplace.cet.co.jp (8.8.8/CET-v2.2) with SMTP id EAA17376; Fri, 17 Apr 1998 04:59:15 GMT Date: Fri, 17 Apr 1998 13:59:14 +0900 (JST) From: Michael Hancock To: freebsd-current@FreeBSD.ORG cc: freebsd-fs@FreeBSD.ORG Subject: Updated vfs patches Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I've separated the layering fixes and the VFS_VRELE framework into separate projects. Here is an updated patch for making *both* refcounting and locking of vnodes reflexive using the current framework. http://www.freebsd.org/~mch/vop1a.diff For a testing tool see http://www.freebsd.org/~mch Some things I should note in this patch are listed below: 1) In the original code, ext2_rmdir and msdosfs_rmdir release the lock across the truncate call but ufs_rmdir doesn't. The ufs_rmdir implementation make it clean for me because I just delete the vput(), but in ext2_rmdir and msdosfs_rmdir I must reacquire the lock so the generic layer can do the vput() (phew!). I'm not sure if we should be holding a lock across truncate and I have yet to review the logs yet to see why. Perhaps someone can shed some light on this. 2) In the union filesystem, there are a also a few case where I have to reacquire the lock. However, it appears that there is an invariant that says if the upper vnode is held by me I can "diddle with the union vnode locking state at will", see UN_KLOCK and UN_ULOCK. I take advantage of this and reacquire the lock by just twiddling a bit instead of calling vn_lock(). Otherwise, this patch consists of mostly deleting vrele and vput calls in underlying filesystems and moving them to the generic layer. Regards, Mike Hancock To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message