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


vfs_pfsctl — PFS control

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

Function

The vfs_pfsctl operation passes control information to the PFS.

Environment on entry and exit

See Environment for PFS operations.

Input parameter format

vfs_pfsctl  (Token_structure,
             OSI_structure,
             Audit_structure,
             Command,
             User_IO_structure,
             Return_value,
             Return_code,
             Reason_code)

Parameters

Token_structure
Supplied parameter
Type:
TOKSTR
Length:
Specified by TOKSTR.ts_hdr.cblen.

The Token_structure contains the PFS's initialization 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.

Command
Supplied parameter
Type:
Integer
Length:
Fullword

The command indicates the function that is to be performed by the PFS.

User_IO_structure
Supplied parameter
Type:
Structure
Length:
Specified by the UIO.u_hdr.cblen field

An area that is to be used by the vfs_pfsctl service to determine the buffer address, length, storage key, and other attributes of the argument that is passed by the caller of pfsctl (BPX1PCT). This area is mapped by the UIO typedef in the BPXYVFSI header file (see Interface structures for C language servers and clients).

Return_value
Returned parameter
Type:
Integer
Length:
Fullword
A fullword in which the vfs_pfsctl operation returns the results of the operation, as one of the following:
Return_value
Meaning
-1
The operation was not successful. The Return_code and Reason_Code values must be filled in by the PFS when Return_value is -1.
0
The operation was successful.
0 or greater
Can be used by the PFS to return the length of the information that is being returned in a modified argument buffer.
Return_code
Returned parameter
Type:
Integer
Length:
Fullword

A fullword in which the vfs_pfsctl operation stores the return code. The vfs_pfsctl operation 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_pfsctl operation should support at least the following error values when the situation applies:
Return_code Explanation
EMVSPARM The command or argument parameters are incorrect.
EFAULT The address of the argument buffer is incorrect, or the user is not authorized to read or write to that location.
EINTR The service was interrupted by a signal.
EPERM Permission was denied. The calling program does not have sufficient authority for the service that was requested.
Reason_code
Returned parameter
Type:
Integer
Length:
Fullword

A fullword in which the vfs_pfsctl operation stores the reason code. The vfs_pfsctl operation 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 product.

Implementation notes

Overview of vfs_pfsctl processing

This function is like vn_ioctl, except that the data is directed to the PFS itself rather than to, or for, a particular file.

A program can communicate with the PFS through the pfsctl (BPX1PCT) callable service, which is converted by the LFS into vfs_pfsctl. An example of this would be a program that is provided with a particular PFS product that displays performance statistics for that PFS.

You should avoid passing addresses with this service, and instead include all data in the buffer.

Negative command values are reserved for use by the LFS.

Command values of less than 0x40000000 are considered to be authorized functions, and a privilege check is made. See the security calls to be made by the PFS section.

For more information, see z/OS DFSMS Using Data Sets.

Specific processing notes
The token_structure of this operation contains only the initialization token.
The following UIO fields are provided by the LFS:
UIO.u_hdr.cbid
Contains UIO_ID (from the BPXYVFSI header file)
UIO.u_hdr.cblen
Specifies the length of the user_IO_structure
UIO.u_buffaddr
Specifies the address of the argument buffer
UIO.u_buffalet
Specifies the ALET of the argument buffer
UIO.u_count
Specifies the length of the argument buffer
UIO.u_asid
Specifies the ASID of the caller
UIO.u_key
Specifies the storage key of the argument buffer
Serialization provided by the LFS
None.
Security calls to be made by the PFS
None expected by the LFS.

When the command value is less than 0x40000000, the LFS calls SAF's Check Privilege callable service to determine if the caller has appropriate privileges before it invokes the PFS with vfs_pfsctl. The results of this call are passed to the PFS using the osi_privileged bit.

If the osi_privileged bit is on, the user has appropriate privileges. If the PFS wishes to restrict this function or certain command values, it can check this bit.

Related services

None.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014