VFLUSH(9)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’… VFLUSH(9) β€” like, the vnode flush era ✨

okay so bestie, welcome to VFLUSH(9), straight out of the Kernel Developer's Manual πŸŽ€ this is the section-9 girlie who handles vnodes for a mount point, and honestly? she ate. no cap.


🌸 NAME 🌸

vflush β€” flush vnodes for a mount point πŸ’– (yes that's the whole vibe: vnodes out, mount point clean, slay)


✨ SYNOPSIS ✨

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

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

like, copy it exactly bestie, headers and all 🫢 iykyk


πŸ’œ DESCRIPTION πŸ’œ

so the vflush() function removes any vnodes in the vnode table that belong to the given mount structure. literally just snatching them out of the table. main character energy πŸ”₯

its arguments are β€” brace yourself, there's four:

  • mp β€” the mount point whose vnodes should be removed. like, the home base 🏠
  • rootrefs β€” the number of references expected on the root vnode. vrele(9) will be invoked on the root vnode rootrefs times. so if you say 3, it's getting vrele(9)'d 3 times, periodt πŸ’…
  • flags β€” the flags indicating how vnodes should be handled. there's three of them and they're all lowkey important:
    • FORCECLOSE β€” if set, busy vnodes will be forcibly closed. yeah. forcibly. 😭 don't say i didn't warn you.
    • SKIPSYSTEM β€” if set, vnodes with the VV_SYSTEM flag set will be skipped. she's not getting involved πŸ™ˆ
    • WRITECLOSE β€” if set, only regular files currently opened for writing will be removed. picky queen πŸ’…
  • td β€” the calling thread. the one doing the calling, obviously πŸ¦‹

⭐ RETURN VALUES ⭐

a value of 0 is returned if the flush is successful πŸŽ‰ otherwise, EBUSY will be returned 😭 that's it, that's the whole return story, ngl.


🌈 SEE ALSO 🌈

go read those too, bestie, they're literally in the same friend group πŸ‘‘


πŸ‘‘ AUTHORS πŸ‘‘

this manual page was written by Chad David <davidc@acns.ab.ca>. ty king 🫢


and that's the whole page fr fr β€” brought to you by Debian, dated November 21, 2001 πŸ’– a vintage icon, we stan. bye bestie, go flush those vnodes βœ¨πŸ“

πŸ“¦ where this page comes from