VFLUSH(9)

πŸ’– VFLUSH(9) πŸ’–

okay bestie, so this is a page from the Kernel Developer's Manual, and it's literally called vflush β€” like, it flushes vnodes for a mount point. yes it's as iconic as it sounds. sit down, grab a strawberry drink, we're doing kernel stuff πŸ“


✨ NAME ✨

vflush β€” flush vnodes for a mount point

no cap, that's the whole vibe. you're evicting vnodes. main character energy but for a mount point πŸ’…


🌸 SYNOPSIS 🌸

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

int
vflush(struct mount *mp, int rootrefs, int flags, struct thread *td);

like, copy that exactly, don't freestyle the signature, i'm begging 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so the way that vflush() works is it removes any vnodes in the vnode table that belong to the given mount structure. that's it. that's the whole job. she's a cleaner and she's booked and busy ✨

now let's go through her arguments one by one, because each one matters and i will not let you skim:

  • mp β€” the mount point whose vnodes should be removed. like, this is the target. the one. πŸ‘‘
  • rootrefs β€” the number of references expected on the root vnode. vrele(9) will be invoked on the root vnode rootrefs times. so yeah, count your refs correctly or it's giving chaos 😭
  • flags β€” the flags indicating how vnodes should be handled. there's a whole little menu of them:
    • FORCECLOSE β€” if set, busy vnodes will be forcibly closed. aggressive. dramatic. lowkey necessary sometimes πŸ’€
    • SKIPSYSTEM β€” if set, vnodes with the VV_SYSTEM flag set will be skipped. not today, system vnodes, not today πŸ™ˆ
    • WRITECLOSE β€” if set, only regular files currently opened for writing will be removed. very picky, very specific, love that for her πŸŽ€
  • td β€” the calling thread. hi bestie, who's asking? πŸ’œ

⭐ RETURN VALUES ⭐

  • a value of 0 is returned if the flush is successful β€” slay, we ate πŸŽ‰
  • otherwise, EBUSY will be returned β€” something's busy, so sorry, try again 😭

🌈 SEE ALSO 🌈

go read those too, iykyk, they're the supporting cast and they carry πŸ”₯


πŸ‘‘ AUTHORS πŸ‘‘

this manual page was written by Chad David <davidc@acns.ab.ca>. thank you Chad, icon behavior, we appreciate you 🫢✨


okay that's the whole page! this one came from Debian, dated November 21, 2001 β€” vintage but still serving πŸ’– go flush responsibly, bestie, and remember: EBUSY is not a personality flaw, it's just a mood. mwah! πŸ’…πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from