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


vfs_statfs — Get the file system status

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

Function

The vfs_statfs operation returns status information about a mounted file system.

Environment on entry and exit

See Environment for PFS operations.

Input parameter format

vfs_statfs  (Token_structure,
             OSI_structure,
             Audit_structure,
             Fsattr_structure,
             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.

Fsattr_structure
Supplied and returned parameter
Type:
FSATTR
Length:
Specified by FSATTR.fs_hdr.cblen

An area in which the vfs_statfs operation returns the file system status information. This area is mapped by the FSATTR 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_statfs 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.
Return_code
Returned parameter
Type:
Integer
Length:
Fullword

A fullword in which the vfs_statfs operation stores the return code. The vfs_statfs 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.

Reason_code
Returned parameter
Type:
Integer
Length:
Fullword

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

Implementation notes

  • Overview of vfs_statfs processing

    The vfs_statfs operation returns information about the status of the file system.

    To account for different release levels, the PFS should zero out the FSATTR area and set fields it understands only up to the smaller of:
    • the input area's length, from the FSATTR length subfield
    • the PFS's native FSATTR length (the one with which it was compiled)
    The input area's FSATTR length subfield should be updated to reflect the amount of data that is returned, or zeroed out. The PFS must not refer to fields beyond the input FSATTR's length, as specified in its length subfield.
  • Specific processing notes
    • The value that is returned in FSATTR.fs_hdr.cblen must match the amount of valid data that is returned in the Fsattr_structure.
    • When a Return_Value of 0 is returned, the PFS is responsible for returning valid data in at least the following fields in the FSATTR:
      • FSATTR.fs_blocksize
      • FSATTR.fs_totalspace
      • FSATTR.fs_usedspace
      • FSATTR.fs_freespace
    • vfs_statfs may be called before the mount process completes for a file system that is being mounted asynchronously. If the PFS is unable to provide valid data, the PFS must return a Return_value of -1, along with a Return_code of EAGAIN.
  • Serialization provided by the LFS

    The vfs_statfs operation is invoked with a shared latch held on the mounted file system.

  • Security calls to be made by the PFS: None.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014