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 vnoderootrefstimes. 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 theVV_SYSTEMflag 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
0is returned if the flush is successful β slay, we ate π - otherwise,
EBUSYwill 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
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms