VFS_VGET(9)
π VFS_VGET π
okay bestie, welcome to the Kernel Developer's Manual, section 9 β this is where the kernel girlies live. today we're talking about VFS_VGET β the function that turns an inode number into a vnode. slay.
β¨ NAME β¨
VFS_VGET β convert an inode number to a vnode π¦
β¨ SYNOPSIS β¨
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/vnode.h>
int
VFS_VGET(struct mount *mp, ino_t ino, int flags, struct vnode **vpp);
β¨ DESCRIPTION β¨
so. VFS_VGET() looks up or creates a vnode from a (mount, inode#) tuple. that's it, that's the whole vibe. it's giving "you gave me a number, i give you a vnode." iconic behavior fr fr π
Its arguments are:
mpβ the mount point. the location, the setting, the whole scene πinoβ the inode representing the file. this is a unique number assigned by the file system when vnodes are first created. no cap, it's literally one-of-a-kind per file.flagsβ additional locking flags to pass through tovget(9). just handing them off, respectfully β¨vppβ return parameter for the vnode. this is where the vnode comes back to you, bestie, like a little gift π«Ά
This is an optional file system entry-point for file systems mainly intended for NFS server use, but many file systems use it internally in VOP_LOOKUP(9) and similar. so it's optional but also everyone's using it. the duality. the range. π
If the file system does not support this call, then it should return EOPNOTSUPP. like, if you can't do it, just say you can't do it. honesty is the policy π
Please see ffs_vget() in sys/ufs/ffs/ffs_vfsops.c for the canonical example. that's the reference implementation, the blueprint, the main character of examples π
β¨ SEE ALSO β¨
β¨ AUTHORS β¨
This manual page was written by Doug Rabson. thank you king πβοΈ
okay that's the whole page bestie, go forth and convert those inode numbers π¦β¨
Debian Β· January 7, 2005 Β· mwah π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 1996 Doug Rabson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms