Comparing the VFS server and PFS interfaces
Certain traditional VFS or vnode functions are missing from the VFS callable services API. In particular, the set of functions in the VFS callable services API does not match the set of file-related operations in the PFS interface.
Some of these missing functions are not generally used by an NFS-style
VFS server, and some of them are implemented in other ways, as explained
in the following list.
- truncate
- A file can be truncated with v_setattr(), specifying the desired file size.
- sync
- A file can be synchronized, or saved to disk, with v_rdwr(). Specify write, a length of 0, and sync-on-write.
- open or close
- NFS-style VFS servers do not use these operations. To maintain the performance characteristics of an open-close protocol, the VFS server can limit access checks to an end user's first reference to a particular file.
- inactivate
- v_rel() is functionally equivalent for a VFS server to the vn_inactive operation for a PFS.
- mount or unmount
- The v_rpn() function implements an NFS-style mount, and these are not explicitly unmounted.
- vfs_fid
- A file's FID is part of the ATTR structure, so it can be obtained with the v_getattr() function. The ATTR is returned on the operations where a FID would usually be needed, so a VFS server generally does not have to explicitly convert vnodes into FIDs.
- vfs_root
- An NFS-style server does not do real mounts, so it does not need to find the root of a real mounted file system. v_rpn() returns the root of a VFS server's VFS.
- check access
- A VFS server does not explicitly check to see if its end user has permission to access a file; instead, it assumes the user's identity and makes the file reference under that authority.