vfs_getvfs(9freebsd)

vfs_getvfs9freebsd

Returns a mount point given its file system identifier

Usage

#include <sys/param.h>

#include <sys/mount.h>

struct mount *

vfs_getvfs(fsid_t *fsid);

Overview

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.

Return values

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

Pseudocode

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

Releases

9 releases since Debian 5.0 (Lenny); the text changed 6 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11–13

Authors

This manual page was written by Chad David ⟨[email protected]⟩.

From freebsd-manpages 12.2-2 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.