tech-kern archive

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

Vnode API change: VOP_LOOKUP

As announced some weeks ago here comes the API change to VOP_LOOKUP:

  Change vnode operation lookup to return the resulting vnode *vpp locked.
  Change cache_lookup() to return an unlocked vnode.

The fast path through the name cache doesn't add unlock/locks.
Most file systems now do this on cache miss:

        <lookup the inode number>
        if (ISDOTDOT)
        VFS_VGET(mp, ino, &vpp);
        if (ISDOTDOT)
                vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
        return *vpp;

This lock/unlock dance will go once VFS_VGET gets replaced or enhanced
with a vnode/inode hash list that looks up vnodes without locking them.

Diff at:

Comments or objections anyone?

J. Hannken-Illjes - - TU Braunschweig 

Home | Main Index | Thread Index | Old Index