VRECYCLE(9)
π VRECYCLE β like, the vnode recycling glow-up (section 9 of the Kernel Developer's Manual, bestie)
okay so picture this: you're deep in kernel land, you've got a vnode that literally nobody is holding onto anymore, and you're like "girl, you're free to go" β that's this whole function. it's giving cleanup crew energy. π§Ήβ¨
β¨ NAME β¨
vrecycle β recycle a vnode if its reference count is zero π
like, if nobody's using it, we're putting it back in the free pile. no cap.
πΈ SYNOPSIS πΈ
#include <sys/param.h>
#include <sys/vnode.h>
int
vrecycle(struct vnode *vp, struct proc *p);
yes bestie, both headers, don't skip sys/param.h or sys/vnode.h or the compiler will absolutely call you out and it will be embarrassing π
π DESCRIPTION π
okay so here's the tea, and it's actually so simple:
the vrecycle() function places the vnode vp on the free list using vgonel(9) if its v_usecount field is zero. zero users? zero problems. off it goes to the free list, slay π
but if v_usecount is non-zero β like, somebody out there is still holding a reference β it simply returns. that's it. no drama, no fuss, it just backs away politely and pretends it wasn't there π
the p argument specifies the process responsible for the call. that's your "who did this" receipt, iykyk π§Ύ
ngl this is one of those functions that's iconic because it does nothing when it's not supposed to. main character restraint.
β RETURN VALUES β
1β the vnode was placed on the free list. it's free! it's liberated! we love a successful glow-up π0β the reference count was non-zero, so nothing happened. not me returning zero, not me π
π¦ SEE ALSO π¦
vgonel(9)vnode(9)
go read those, they're literally the lore that makes this page make sense π«Ά
π HISTORY π
This man page was originally written for OpenBSD. periodt. π
okay that's the whole vibe check, bestie β this page is from the Debian fam, dated August 5, 2020. go forth and recycle responsibly, mwah ππ§ββοΈ
π¦ where this page comes from
- nixpkgs unstable: cvs-export
- Copyright (c) 2002 Peter Werner
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms