Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
LFS/PFS control block structure z/OS UNIX System Services File System Interface Reference SA23-2285-00 |
|
In the LFS/PFS model that is used in z/OS UNIX, each active file system object is represented in the LFS and PFS by its own control blocks or structures. These are called the vnode and inode, respectively. There is a one-to-one relationship between the LFS's vnode and the PFS's inode. They effectively point to each other across the interface, although neither ever directly refers to the other's fields. Porting noteSuch terms as "build the inode", as used in this topic, mean "construct the in-storage representation of a file". This does not imply anything about the file representation as it is stored on disk. There is only one vnode-inode pair for each data object in the system, no matter how many links there are to the object (for file objects), or how many users may be accessing the object. Users who access a vnode through the LFS must be accessing the same data object through the PFS. Token_structure: A difference between the z/OS UNIX PFS interface and other implementations is that the vnode is not directly addressable by the PFS during a vnode operation. A Token_structure is presented on all calls as a vnode surrogate. The Token_structure contains the following 8-byte PFS tokens:
For a vnode operation, Token_structure contains all three tokens; for a VFS operation, it contains only the initialization and mount tokens. See the TOKSTR typedef in Interface structures for C language servers and clients for the mapping of Token_structure. Porting noteThe file token within Token_structure is a copy of the "private data" area in the vnode. If a PFS expects a vnode structure as an input parameter, but does not refer to any vnode fields other than the PFS's private data pointer, the subfields within the program's vnode structure can be rearranged so that the pointer's offset matches that used in Token_structure. In this way, the PFS code that refers to this field will pick up the correct value when it is recompiled, and does not have to be changed. Token_structure is transient; it lives only for the duration of a single call. Figure 1. The LFS/PFS
control block structure
The control block relationships described so far are illustrated
in Figure 1. Reading from left to right,
in the order they are created:
|
Copyright IBM Corporation 1990, 2014
|