Function
The vfs_vget operation returns
a vnode token for the file or directory that is represented by the
input file identifier (FID).
Input parameter format
vfs_vget (Token_structure,
OSI_structure,
Audit_structure,
File_identifier,
Vnode_token,
Return_value,
Return_code,
Reason_code)
Parameters
- Token_structure
- Supplied parameter
- Type:
- TOKSTR
- Length:
- Specified by TOKSTR.ts_hdr.cblen.
The Token_structure represents the file system (VFS)
that is being operated on. It contains the PFS's initialization token
and mount token. Refer to LFS/PFS control block structure for a discussion
of this structure, and to the TOKSTR typedef in BPXYPFSI in Interface structures for C language servers and clients for its mapping.
- OSI_structure
- Supplied and returned parameter
- Type:
- OSI
- Length:
- Specified by OSI.osi_hdr.cblen.
The OSI_structure contains information that is used
by the OSI operations that may be called by the PFS. See OSI services for more information.
It also contains
MVS-specific information that needs to be passed to the PFS, including
SMF accounting fields, a work area, a recovery area, and an optional
pointer to an output ATTR structure. For more details on the OSI structure,
see The OSI structure.
This area is mapped by
the OSI typedef in BPXYPFSI in Interface structures for C language servers and clients.
- Audit_structure
- Supplied parameter
- Type:
- CRED
- Length:
- Specified by CRED.cred_hdr.cblen.
The Audit_structure contains information that is
used by the security product for access checks and auditing. It is
passed to most SAF routines that are invoked by the PFS.
Refer
to Security responsibilities and considerations for a discussion of security processing,
and to the CRED typedef in BPXYPFSI in Interface structures for C language servers and clients for
the mapping of this structure.
- File_identifier
- Supplied parameter
- Type:
- FID
- Length:
- 8 bytes
The name of an 8-byte area containing the file identifier
of the file or directory for which a vnode token is to be returned.
This area is mapped by the FID typedef in the BPXYVFSI header file
(see Interface structures for C language servers and clients).
- Vnode_token
- Returned parameter
- Type:
- Token
- Length:
- 8 bytes
Vnode_token is used to return the vnode token that
corresponds to the input FID.
- Return_value
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword in which the vfs_vget service
returns the results of the operation, as one of the following:
- Return_value
- Meaning
- -1
- The operation was not successful. This causes the vfs_vget request
to fail. The Return_code and Reason_Code are returned to the caller.
- 0
- The operation was successful.
- Return_code
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword in which the vfs_vget service
stores the return code. The vfs_vget service returns Return_code only
if Return_value is -1. For a complete list of supported
return code values, see z/OS UNIX System Services Messages and Codes.
The vfs_vget service should support
at least the following error values:
Return_code |
Explanation |
---|
ENOENT |
The file indicated by the File_identifier does not exist
in the mounted file system that is indicated by token_structure |
EIO |
An input/output error occurred while attempting to access
data pertaining to the file indicated by the File_identifier. |
- Reason_code
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword in which the vfs_vget service
stores the reason code. The vfs_vget service returns Reason_code
only if Return_value is -1. Reason_code further
qualifies the Return_code value. These reason codes are documented
by the PFS.
Implementation notes
- Overview of vfs_vget processing
Given a file identifier
as input, vfs_vget returns a vnode token that refers to the file.
The file identifier uniquely identifies a file in a particular mounted
file system. Its validity persists across mounting and unmounting
of the file system, as well as z/OS UNIX re-IPLS. This
distinguishes the file identifier from the vnode token, which relates
to a file in active use, and whose validity persists only until the
token is released via vn_inactive. The FID for a file is created by
the PFS and returned in the ATTR structure, which is mapped by typedef
ATTR in the BPXYVFSI header file (see Interface structures for C language servers and clients)
by vn_getattr.
- Specific processing notes
File identifier zero is taken
to refer to the root of the mounted file system.
- Serialization provided by the LFS
The vfs_vget operation
is invoked with a shared latch held on the mounted file system.
- Security calls to be made by the PFS: None.