VFS_MOUNT(9)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’– NAME πŸ’–

okay so this is the VFS_MOUNT(9) page from the Kernel Developer's Manual, and it's literally about VFS_MOUNT β€” mount a file system. no cap, that's the whole vibe ✨


🌸 SYNOPSIS 🌸

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

int
VFS_MOUNT(struct mount *mp);

πŸ¦‹ DESCRIPTION πŸ¦‹

the VFS_MOUNT() macro mounts a file system into the system's namespace or updates the attributes of an already mounted file system. it's giving "two jobs, one icon" πŸ’…

πŸŽ€ the argument it expects πŸŽ€

  • mp β€” Structure representing the file system.

okay so here's the tea: the VFS_MOUNT() macro is called both to mount new file systems and to change the attributes of an existing file system. like, it's versatile fr fr.

if the MNT_UPDATE flag is set in mp->mnt_flag, then the file system should update its internal state from the value of mp->mnt_flag. this can be used, for instance, to convert a read-only file system to read-write. it is also used by mountd(8) to update the NFS export information for the file system. the way that's a whole glow-up for your mount 🫢

if the MNT_UPDATE flag is not specified, then this is a newly mounted file system. the file system code should allocate and initialize any private data needed to represent the file system β€” and yes bestie, it can use the mp->mnt_data field to store this information. slay πŸ’Ύβœ¨


πŸ‘‘ SEE ALSO πŸ‘‘

go check out VFS(9) and vnode(9) β€” iykyk πŸ”₯


πŸ’œ AUTHORS πŸ’œ

This manual page was written by Doug Rabson. iconic behavior, honestly 🌈


mwah πŸ’‹ β€” this little page is from Debian, dated May 23, 2009. periodt πŸŽ€

πŸ“¦ where this page comes from