From owner-freebsd-hackers Sun Jan 26 13:58:16 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id NAA27031 for hackers-outgoing; Sun, 26 Jan 1997 13:58:16 -0800 (PST) Received: from root.com (implode.root.com [198.145.90.17]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA27026 for ; Sun, 26 Jan 1997 13:58:14 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by root.com (8.7.6/8.6.5) with SMTP id NAA08258; Sun, 26 Jan 1997 13:56:14 -0800 (PST) Message-Id: <199701262156.NAA08258@root.com> X-Authentication-Warning: implode.root.com: Host localhost [127.0.0.1] didn't use HELO protocol To: Terry Lambert cc: michaelh@cet.co.jp, bde@freefall.freebsd.org, Hackers@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern kern_lockf.c In-reply-to: Your message of "Sun, 26 Jan 1997 13:24:13 MST." <199701262024.NAA02217@phaeton.artisoft.com> From: David Greenman Reply-To: dg@root.com Date: Sun, 26 Jan 1997 13:56:14 -0800 Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >This is one of the things I am always on about. > > >The call trace should be: > > fcntl(lock) <- check call syntax here > lf_advlock(lock) <- check arg values here > if( !VOP_ADVLOCK(lock)) > lf_advlock(unlock) > >And the FS specific VOP_ADVLOCK should simply return 0 in all cases for >most FS's. I disagree. The call trace should be: fcntl(lock) VOP_ADVLOCK(lock) lf_advlock(lock) This works properly with unusual filesystem stacking and is more flexible. >The veto architecture is needed to make union FS's not accidently >lf_advlock() the same vnode twice. For example, say I have a quota >and a non-quota "view" onto the same FS. The quota implementation >is a stacking layer so that all FS's can have quotas. The vnode >is passed through the quota layer, because all the quota layer does >is a name space incursion to subtract out the quota file on the FS >root. A lock on the quota vnode and the non-quota vnode would be >a lock on the same vnode. Only leaf filesystems should call lf_advlock(), so upper layers don't matter. union_advlock should just be a pass-through. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project