VFS_FHTOVP(9) MidnightBSD Kernel Developer’s Manual VFS_FHTOVP(9)

NAME

VFS_FHTOVP — turn an NFS filehandle into a vnode

SYNOPSIS

#include <sys/param.h>
#include <sys/mount.h>
#include <sys/vnode.h>

int

VFS_FHTOVP(struct mount *mp, struct fid *fhp, struct vnode **vpp);

DESCRIPTION

The VFS_FHTOVP() macro is used by the NFS server to turn an NFS filehandle into a vnode.

The arguments it expects are:

mp

The file system.

fhp

The filehandle to convert.

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.

RETURN VALUES

The locked vnode for the file will be returned in *vpp.

SEE ALSO

VFS(9), VFS_CHECKEXP(9), VFS_VPTOFH(9), vnode(9)

AUTHORS

This manual page was written by Doug Rabson.

MidnightBSD 0.3 January 7, 2005 MidnightBSD 0.3