Contents

cache_enter

Add a (name,vnode) entry to the VFS namecache.

Declaration

void cache_enter(vnode_t dvp, vnode_t vp, struct componentname *cnp);

Parameters

  • dvp:

    Directory in which file lives.

  • vp:

    File to add to cache. A non-NULL vp is stored for rapid access; a NULL vp indicates that there is no such file in the directory and speeds future failed lookups.

  • cnp:

    Various data about lookup, e.g. filename and intended operation.

Return Value

void.

Discussion

Generally used to add a cache entry after a successful filesystem-level lookup or to add a negative entry after one which did not find its target.

See Also

Support