Contents

vnode_update_identity

Update vnode data associated with the vfs cache.

Declaration

void vnode_update_identity(vnode_t vp, vnode_t dvp, const char *name, int name_len, uint32_t name_hashval, int flags);

Parameters

  • vp:

    The vnode whose information to update.

  • dvp:

    Parent to set on the vnode if VNODE_UPDATE_PARENT is used.

  • name:

    Name to set in the cache for the vnode if VNODE_UPDATE_NAME is used. The buffer passed in can be subsequently freed, as the cache does its own name storage. String should be NULL-terminated unless length and hash value are specified.

  • name_len:

    Length of name, if known. Passing 0 causes the cache to determine the length itself.

  • name_hashval:

    Hash value of name, if known. Passing 0 causes the cache to hash the name itself.

  • flags:

    VNODE_UPDATE_PARENT: set parent. VNODE_UPDATE_NAME: set name. VNODE_UPDATE_CACHE: flush cache entries for hard links associated with this file. VNODE_UPDATE_PURGE: flush cache entries for hard links and children of this file.

Return Value

void.

Discussion

The vfs namecache is central to tracking vnode-identifying data and to locating files on the system. vnode_update_identity() is used to update vnode data associated with the cache. It can set a vnode's parent and/or name (also potentially set by vnode_create()) or flush cache data.

See Also

vnode