VFS_BUSY(9)
π
VFS_BUSY(9) β the vfs_busy girlies' guide π
okay so this is a page from the Kernel Developer's Manual and it's about vfs_busy, bestie. it's short, it's iconic, it's giving "small but mighty." let's get into it β¨
πΈ NAME πΈ
vfs_busy β marks a mount point as busy
π SYNOPSIS π
#include <sys/param.h>
#include <sys/mount.h>
int
vfs_busy(struct mount *mp, int flags);
π¦ DESCRIPTION π¦
so the vfs_busy() function marks a mount point as busy by incrementing the reference count of a mount point. that's the whole glow-up, no cap π
it also delays unmounting by sleeping on mp if the MNTK_UNMOUNT flag is set in mp->mnt_kern_flag and the MBF_NOWAIT flag is not set. like, it literally says "not right now, we're busy" and takes a little nap about it π΄
its arguments are:
mpβ the mount point to busy. this is the main character, the one getting marked.flagsβ flags controlling howvfs_busy()should act. the vibes controller, basically ποΈMBF_NOWAITβ do not sleep ifMNTK_UNMOUNTis set. no naps allowed, periodt π ββοΈMBF_MNTLSTLOCKβ drop themountlist_mtxin the critical path. release the lock, it's not holding you back bestie π
β RETURN VALUES β
A 0 value is returned on success. slay! π
If the mount point is being unmounted and the MBF_NOWAIT flag is specified, ENOENT will be returned. not the win we wanted, but the win we deserved π
π₯ ERRORS π₯
[ENOENT]β the mount point is being unmounted (MNTK_UNMOUNTis set). it's literally on its way out, sorry babe π
π SEE ALSO π
vfs_unbusy(9)β the counterpart, the "okay we're done here" energy. iykyk π«Ά
π AUTHORS π
This manual page was written by Chad David <davidc@acns.ab.ca>. thank you Chad, you ate that fr fr π
ngl this one's short, but everything in it matters β don't skip the flags, don't skip the errors, that's the whole plot π§
and that's the tea π β much love from Debian, dated February 11, 2013. go busy a mount point responsibly, bestie π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms