tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Move the vnode lock into file systems

On Tue, Jun 29, 2010 at 04:54:46PM +0200, Juergen Hannken-Illjes wrote:
> On Sat, Jun 26, 2010 at 10:39:27AM +0200, Juergen Hannken-Illjes wrote:
> > The vnode lock operations currently work on a rw lock located inside the
> > vnode.  I propose to move this lock into the file system node.
> > 
> > This place is more logical as we lock a file system node and not a vnode.
> > This becomes clear if we think of a file system where one file system node
> > is attached to more than one vnode.  Ptyfs allowing multiple mounts is such
> > a candidate.
> > 
> > A diff implemeting this for ufs, lfs and ext2fs is attached.
> > 
> > Comments or objections anyone?
> Looks like the minimal consensus for now is to remove the vlockmgr().
> The attached diff does it and rearranges vnode locking (in the genfs case)
> into the functions genfs_lock(), genfs_unlock() and genfs_islocked().
> The lock itself goes into the vnode and the remaining LK_* flags move
> from sys/lock.h to sys/vnode.h.  All in-file system calls to vlockmgr()
> get replaced with VOP_LOCK() or VOP_UNLOCK().
> Comments or objections anyone?

I too have concerns about some of the multi-vnode ideas, but I think this 
step is great.

Take care,


Attachment: pgpZOMV5HAYmR.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index