[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

vfs_statfs Entry Point

Purpose

Returns virtual file system statistics.

Syntax

int vfs_stafs (vfsp, stafsp, crp)
struct vfs *vfsp;
struct statfs *stafsp;
struct ucred *crp;

Parameters

vfsp Points to the vfs structure being queried. This structure is defined in the /usr/include/sys/vfs.h file.
stafsp Points to a statfs structure. This structure is defined in the /usr/include/sys/statfs.h file.
crp Points to the cred structure. This structure contains data that the file system can use to validate access permission.

Description

The vfs_stafs entry point is called by the logical file system to obtain file system characteristics. Upon return, the vfs_statfs entry point has filled in the following fields of the statfs structure:

f_blocks Specifies the number of blocks.
f_files Specifies the total number of file system objects.
f_bsize Specifies the file system block size.
f_bfree Specifies the number of free blocks.
f_ffree Specifies the number of free file system objects.
f_fname Specifies a 32-byte string indicating the file system name.
f_fpack Specifies a 32-byte string indicating a pack ID.
f_name_max Specifies the maximum length of an object name.

Fields for which a vfs structure has no values are set to 0.

Execution Environment

The vfs_statfs entry point can be called from the process environment only.

Return Values

0 Indicates success.

Nonzero return values are returned from the /usr/include/sys/errno.h file to indicate failure.

Related Information

The statfs subroutine.

Virtual File System Overview, Virtual File System Kernel Extensions Overview, Understanding Data Structures and Header Files for Virtual File Systems, Logical File System Overview, Understanding Virtual Nodes (V-nodes) in AIX Kernel Extensions and Device Support Programming Concepts.

List of Virtual File System Operations.


[ Previous | Next | Contents | Home | Search ]