VCLEAN(9)

๐Ÿ“ฆ in nixpkgs unstable

๐Ÿ’… VCLEAN(9) โ€” a Kernel Developerโ€™s Manual moment ๐Ÿ’…

okay bestie, this page is from the Kernel Developerโ€™s Manual, and itโ€™s all about vclean โ€” the function that disassociates the underlying file system from a vnode like โ€œwe are SO done hereโ€ โœจ

๐ŸŒธ NAME ๐ŸŒธ

  • vclean โ€” disassociate the underlying file system from a vnode.

โœจ SYNOPSIS โœจ

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

void
vclean(struct vnode *vp, int flags, struct proc *p);

๐Ÿซถ DESCRIPTION ๐Ÿซถ

The vclean() function clears any VM and buffer data associated with the vnode vp and reclaims it from the underlying file system. Literally the โ€œclean up your roomโ€ of vnode functions, but make it kernel-level ๐Ÿ’…

Its arguments are:

  • vp โ€” the vnode to be cleaned. main character vnode fr.
  • flags โ€” the flags indicating how the vnode should be handled.
    • DOCLOSE โ€” if this flag is set, vclean() will call vinvalbuf(9) on the vnode. If the vnode is active, it will be closed and inactivated in the underlying file system. no cap, thatโ€™s the whole flag.
  • p โ€” the process responsible for this call. like, whoโ€™s holding the clipboard on this one.

On exit, the v_tag field of the vnode will be set to VT_NON, and if the vnode was active, it will be placed on the vnode free list. Slay, itโ€™s been reclaimed and filed away โœจ

๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

๐ŸŒˆ HISTORY ๐ŸŒˆ

This man page was originally written for OpenBSD. iconic origin story, no notes ๐Ÿ’–


Cute little sign-off: this pageโ€™s source/version is Debian, and the date is November 14, 2020 โ€” mwah ๐Ÿ’‹

๐Ÿ“ฆ where this page comes from