Subject: Re: vn_lock(LK_RETRY) (was: Re: CVS commit: src/sys/miscfs)
To: Bill Studenmund <email@example.com>
From: Chris Jepeway <firstname.lastname@example.org>
Date: 06/21/2004 19:02:26
> VOP_LOCK() and friends are not advisory.
OK. A reading of the Red Daemon book led me
to believe otherwise. I realize that's
no longer a definitive source for NetBSD workings.
I mention it as the original BSD VFS/VOP design,
where the idea seems to be that VOP_LOCK() is merely a
hint to a file system that "hey, if you actually lock
something now, I'll guarantee consistent access to your
vnodes and you won't need to do any extra work." I thought
all along, though, that any file system that felt up
to it could do that extra work if it wanted.
> While what you describe would be fine if we had only leaf file
> systems, it
> won't work for layered file systems.
> They are implemented assuming that
> VOP_LOCK() and friends actually work.
Am I following you, here? You're saying the implementation of the
layered, stackable file systems like nullfs require that
all leaf file systems implement VOP_LOCK()? Err...sorry, not
"the implementation of layered f/s requires" but rather "the API for
implementing layered f/s requires?"
> Note that flock(2) locking is different. Those operations go through
Sure, sure, sure. Different beastie.