VFS_UNMOUNT(9)

πŸ’– VFS_UNMOUNT πŸ’–

okay bestie, welcome to the Kernel Developer's Manual (yes that's the section, 9, kernel-land, we're deep in the machine rn 🫢) β€” and today's main character is VFS_UNMOUNT, the macro whose whole entire job is unmounting a file system. slay. ✨


🌸 NAME 🌸

VFS_UNMOUNT β€” unmount a file system. that's it, that's the vibe. πŸ’…


✨ SYNOPSIS ✨

okay so before you can even speak to this thing you gotta include the sacred texts, fr fr:

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

int
VFS_UNMOUNT(struct mount *mp, int mntflags);

like, no cap, those three includes are non-negotiable. it's giving "do your homework first" energy πŸ“š


πŸ¦‹ DESCRIPTION πŸ¦‹

the VFS_UNMOUNT() macro unmounts a file system. that's the whole plot. unmount. file system. gone. bye. πŸ‘‹

now, the arguments it expects, and bestie it expects exactly these:

  • mp β€” the file system. that's the one you're sending off into the sunset. πŸŒ…
  • mntflags β€” a bit-mask of flags for the unmount operation. think of it like the settings menu for your goodbye. the flags currently supported by VFS_UNMOUNT() are:
    • MNT_FORCE β€” open files are forcibly closed before the file system is unmounted. > ⚠️ yeah so, forcibly. like, not asked politely. not given a warning. just yanked. so know what you're doing before you flip this one, mkay? πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

go read these too, they're all in the same friend group:


πŸ‘‘ AUTHORS πŸ‘‘

this manual page was written by Doug Rabson. iconic behavior, honestly. 🫢


and that's the whole page, bestie!! this little baddie comes from the Debian crew and it's dated May 23, 2009 β€” vintage, but she still ate. πŸ’– now go unmount something responsibly. mwah. πŸ’…βœ¨

πŸ“¦ where this page comes from