VFS_GETVFS(9)
π VFS_GETVFS(9) β the kernel dev manual, but make it cute π
okay so bestie, welcome to the kernel developer's manual for vfs_getvfs β yes it's a section 9 page, yes it's real, yes we're doing this π
β¨ NAME β¨
vfs_getvfs β returns a mount point given its file system identifier πΈ
β¨ SYNOPSIS β¨
#include <sys/param.h>
#include <sys/mount.h>
struct mount *
vfs_getvfs(fsid_t *fsid);
π¦ DESCRIPTION π¦
so the vfs_getvfs() function returns the mount point structure for a file system, given its file system identifier. literally that's it, that's the whole vibe π«Ά
β tiny but important detail, bestie: the file system ID should have been allocated by calling vfs_getnewfsid(9) β otherwise, it will not be found. no cap. π
a major user of vfs_getvfs() is NFS, which uses the fsid as part of file handles in order to determine the file system a given RPC is for π₯ and if vfs_getvfs() fails to find the mount point related to fsid, the file system is considered stale. awkward. π
π RETURN VALUES π
- if
fsidis found β the mount point for the ID is returned β¨ - otherwise β
NULLis returned π
π§ PSEUDOCODE π§
here's the vibe in code form, iconic honestly:
if ((mp = vfs_getvfs(&fhp->fh_fsid)) == NULL) {
error = ESTALE;
goto out;
}
π SEE ALSO π
vfs_getnewfsid(9)β go read this one too, iykyk π
π AUTHORS π
this manual page was written by Chad David <davidc@acns.ab.ca> β king behavior honestly π
okay that's the whole page bestie, you ate that π and for the record: this one's from the Debian manual set, dated November 21, 2001 β yeah it's old but it still slays π mwah, go mount something responsibly π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms