VGONE(9)

πŸ’– VGONE(9) β€” the vibe is "let's recycle this vnode" πŸ’–

from the Kernel Developer's Manual ✨ manual section 9, bestie


🌸 NAME 🌸

vgone β€” get a vnode all dolled up and ready to be reused πŸŽ€


✨ SYNOPSIS ✨

#include <sys/param.h>
#include <sys/vnode.h>

void
vgone(struct vnode *vp);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. The vgone() function is literally prepping a vnode for destruction πŸ’€ and that prep is a whole routine, not just a vibe check. It includes:

  • cleaning up all the file system specific data 🧼
  • removing the vnode from its mount point vnode list πŸ“‹

and here's the juicy part: if the vnode has a v_usecount of zero, and its VI_DOOMED flag is not set, then it gets moved to the head of the free list πŸ‘‘ β€” because in most cases the vnode is about to be reused, or its file system is being unmounted. it's giving "recycling era" ♻️

Also, no cap: vgone() takes an exclusively locked vnode, and returns with the vnode exclusively locked. lock in, lock out, periodt πŸ”’


🫢 SEE ALSO 🫢


πŸ‘‘ AUTHORS πŸ‘‘

This manual page was written by Chad David <davidc@acns.ab.ca> πŸ’œ


k bye bestie, this one came from Debian and is dated November 12, 2010 β€” love that for us, mwah πŸ’…βœ¨

πŸ“¦ where this page comes from