Function

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

VNOP_BWRITE

Write a buffer to backing store.

VNOP_FSYNC

Call down to a filesystem to synchronize a file with on-disk state.

VNOP_GETXATTR

Get extended file attributes.

VNOP_IOCTL

Call down to a filesystem or device driver to execute various control operations on or request data about a file.

VNOP_READ

Call down to a filesystem to read file data.

VNOP_SETXATTR

Set extended file attributes.

VNOP_STRATEGY

Initiate I/O on a file (both read and write).

VNOP_WRITE

Call down to the filesystem to write file data.

cache_lookup

Check for a filename in a directory using the VFS name cache.

cache_purge

Remove all data relating to a vnode from the namecache.

cache_purge_negatives

Remove all negative cache entries which are children of a given vnode.