VFS_ROOT(9)

πŸ’– VFS_ROOT πŸ’– β€” like, the kernel dev's manual, section 9, bestie πŸŽ€

okay so this is VFS_ROOT from the Kernel Developer's Manual (that's section 9, for the uninitiated β€” iykyk). it's a lil function that hands you the root vnode of a file system. that's it. that's the whole vibe. ✨


🌸 NAME 🌸

VFS_ROOT β€” return the root vnode of a file system πŸ¦‹


✨ SYNOPSIS ✨

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

int
VFS_ROOT(struct mount *mp, int flags, struct vnode **vpp);

like, literally just include those three headers first or nothing works, bestie 😭


πŸ‘‘ DESCRIPTION πŸ‘‘

Return a locked vnode for the root directory of the file system. that's the whole job. it shows up, it locks the root dir, it hands it to you. main character energy fr fr πŸ’…

its arguments are, and listen because these matter:

  • mp β€” the file system. the whole thing. the entire vibe. πŸ—‚οΈ
  • flags β€” the lock type. could be LK_EXCLUSIVE or LK_SHARED. but heads up bestie: the file system is free to ignore the flags argument and instead acquire an exclusive lock. so don't be out here assuming you got what you asked for, okay? 🫠
  • vpp β€” return parameter for the root vnode. this is where the root vnode goes when the function is done being iconic. πŸ’«

πŸ¦‹ SEE ALSO πŸ¦‹

go read those too, no cap, they're the whole friend group 🌈


πŸŽ€ AUTHORS πŸŽ€

This manual page was written by Doug Rabson. king behavior honestly πŸ‘‘


and that's the page!! Debian, dated May 23, 2009 β€” yeah she's a lil vintage but she still eats πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from