VFS_BUSY(9)

πŸ’– VFS_BUSY(9) β€” Kernel Developer's Manual πŸ’–

okay bestie, so you know how mount points can't just ✨vanish✨ while somebody's still using them? yeah. this is the page about that. vfs_busy β€” marks a mount point as busy. it's giving bouncer-at-the-club energy, no cap. πŸŽ€


✨ 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 vfs_busy() marks a mount point as busy by incrementing the reference count of a mount point. that's it, that's the main character move. πŸ‘‘

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. so if someone's mid-unmount, this function will literally take a lil nap until it's safe. not me being patient for once 😭

its arguments are:

  • mp β€” the mount point to busy. 🫢
  • flags β€” flags controlling how vfs_busy() should act. the whole vibe-check list:
    • MBF_NOWAIT β€” do not sleep if MNTK_UNMOUNT is set. (like, we're not waiting around, periodt.)
    • MBF_MNTLSTLOCK β€” drop the mountlist_mtx in the critical path.

πŸ”₯ 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. so close, but no πŸ’€


πŸ’œ ERRORS πŸ’œ

  • [ENOENT] β€” the mount point is being unmounted (MNTK_UNMOUNT is set). it's giving "sorry bestie, door's closed" πŸ™ˆ

🌈 SEE ALSO 🌈

  • vfs_unbusy(9) β€” the other half of the situationship πŸ’ž

πŸ‘‘ AUTHORS πŸ‘‘

this manual page was written by Chad David <davidc@acns.ab.ca>. absolute icon, we thank him for his service 🫑


and that's the whole page, bestie! go forth and busy your mount points responsibly 🧚

Debian Β· February 11, 2013 Β· VFS_BUSY(9) πŸ’– β€” ok that's the version + date + manual name, mwah, see you in the next manpage βœ¨πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from