logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

vfs_getvfs — returns a mount point given its file system identifier

Authors

       This manual page was written by Chad David <davidc@acns.ab.ca>.

Debian                                          November 21, 2001                                  VFS_GETVFS(9)

Description

       The  vfs_getvfs()  function  returns  the  mount  point structure for a file system given its file system
       identifier.  The file system ID should have been allocated by calling  vfs_getnewfsid(9);  otherwise,  it
       will not be found.

       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.  If vfs_getvfs() fails to find the mount point related to  fsid,  the
       file system is considered stale.

Name

       vfs_getvfs — returns a mount point given its file system identifier

Pseudocode

       if ((mp = vfs_getvfs(&fhp->fh_fsid)) == NULL) {
               error = ESTALE;
               goto out;
       }

Return Values

       If fsid is found, the mount point for the ID is returned; otherwise, NULL is returned.

See Also

vfs_getnewfsid(9)

Synopsis

#include<sys/param.h>#include<sys/mount.h>structmount*vfs_getvfs(fsid_t*fsid);

See Also