Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Jan 1997 13:56:14 -0800
From:      David Greenman <dg@root.com>
To:        Terry Lambert <terry@lambert.org>
Cc:        michaelh@cet.co.jp, bde@freefall.freebsd.org, Hackers@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/kern kern_lockf.c 
Message-ID:  <199701262156.NAA08258@root.com>
In-Reply-To: Your message of "Sun, 26 Jan 1997 13:24:13 MST." <199701262024.NAA02217@phaeton.artisoft.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701262156.NAA08258>