VFS_FHTOVP(9)
πΈ NAME πΈ
okay so bestie, VFS_FHTOVP is a thing from the Kernel Developer's Manual β yes, VFS_FHTOVP(9), iykyk β and it does exactly one iconic job: turn an NFS filehandle into a vnode. that's the whole vibe. π
β¨ SYNOPSIS β¨
the include vibe check comes first, then the signature, exactly like this:
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/vnode.h>
int
VFS_FHTOVP(struct mount *mp, struct fid *fhp, int flags,
struct vnode **vpp);
π¦ DESCRIPTION π¦
the VFS_FHTOVP() macro is used by the NFS server to turn an NFS filehandle into a vnode. no cap, that's its main character moment. β¨
the arguments it expects are:
mpβ the file system.fhpβ the filehandle to convert.flagsβ additional locking flags to pass through tovget(9). File systems are allowed to ignoreflagsand useLK_EXCLUSIVEinstead. so don't be shocked if they do, bestie. πvppβ return parameter for the new locked vnode.
the contents of the filehandle are defined by the file system and are not examined by any other part of the system. it should contain enough information to uniquely identify a file within the file system as well as noticing when a file has been removed and the file system resources have been reused for a new file. for instance, UFS file system stores the inode number and inode generation counter in its filehandle. π
a call to VFS_FHTOVP() should generally be preceded by a call to VFS_CHECKEXP(9) to check if the file is accessible to the client. like, do the check first, fr fr. π«Ά
π RETURN VALUES π
the locked vnode for the file will be returned in *vpp. that's the return. slay. π
π SEE ALSO π
go read these next, bestie:
π AUTHORS π
this manual page was written by Doug Rabson. shoutout to Doug, the author of this manual page. π
mwah π this whole page is brought to you by Debian, dated May 19, 2019, and it's VFS_FHTOVP(9) β periodt. π«Ά
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 1996 Doug Rabson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms