Subject: Re: CVS commit: src
To: None <wrstuden@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 06/21/2004 12:02:27
> > > What "tricks" could merge locks A and B into B?
> >
> > something like this:
> > ffs_lock(...)
> > {
> >
> > genfs_lock(vp, ...);
> > if (vp is snapshot) {
> > lockmgr(snaplk, ...);
> > }
> > }
>
> That 1) forces all callers to pay a (slight) penalty for snapshot support
> being present, even if they never use it,
and transferlockers() forces all lockmgr users to pay the penalty.
> and 2) it destroys our ability
> to use v_vnlock. v_vnlock makes life much nicer for layered file systems,
> as it lets us readily access one lock for a stack of vnodes.
i think that it's better to remove v_vnlock because:
- it's only useful in the limited cases.
- it involves complexity in layered filesystems
as they should deal with two cases. (exported and not exported)
- it violates VOP abstraction.
sharing a lock can be achieved using locking VOPs.
YAMAMOTO Takashi