z/OS UNIX System Services File System Interface Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Exporting files to a VFS server

z/OS UNIX System Services File System Interface Reference
SA23-2285-00

For a VFS server to access files that are owned by a PFS on the same system, the following support is necessary in the PFS:
  • Its file objects must be visible in the file hierarchy. This is the same as saying that the PFS supports vfs_mount and vn_lookup.
  • Each file must have a unique and persistent file identifier (FID). This is 8 bytes long, and is usually made up from the file's 4-byte st_ino value and a 4-byte uniquifier. The uniquifier must be constructed by the PFS if it reuses file st_ino values, so that the full 8-byte FID is unique and never reused.

    The FID must persist over PFS restarts and even full-system IPLs. A VFS server's client may access a file days after it has obtained the FID.

  • The FID must be returned in all ATTR structures that are returned.
  • The PFS must be able to look up a file by its FID reasonably efficiently. The vfs_vget operation must be supported to convert a FID value to a vnode-inode pairing. This is similar to vn_lookup, except that a FID within a file system is looked up, rather than a name within a directory.
  • Access checking on read/write must be supported, as discussed in Opening and closing files and first references to files.
  • vn_readdir must not require vn_open and vn_close.
  • For better performance, the PFS should support:
    • Implicit vn_getattr on any operation that passes a nonzero ATTR pointer in the OSI structure.
    • Sync-on-write, when that bit is on in the UIO. (This eliminates the need for a separate call to fsync.)
    • Real-page support with DATOFF moves for memory-mapped files.

Porting note

The vn_fid operation is not used to convert a vnode to a FID. The combination of returning the FID in the ATTR structure and implicit vn_getattr on many operations is much faster for VFS servers.

When a VFS server's client mounts part of the file hierarchy, it really only obtains tokens to a directory and the directory's file system. It is not a mount like that performed for the MOUNT command, and the PFS does not receive a vfs_mount or any indication that it occurred. The first call from a VFS server that the PFS would see is likely to be a vfs_vget, vn_lookup, or vn_readdir.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014