HP-UX Reference (11i v2 07/12) - 7 Device (Special) Files, 9 General Information, Index (vol 10)
v
vxfsio(7) vxfsio(7)
NAME
vxfsio - VxFS file system control functions
SYNOPSIS
#include <sys/types.h>
#include <sys/fs/vx_ioctl.h>
int ioctl(int fildes, int cmd, ... /* arg */);
DESCRIPTION
The vxfs ioctl(2) enhancements provide for extended control over open files.
The argument fildes is an open file descriptor.
The data type and value of arg
are specific to the type of command specified by cmd. Unless specified,
arg is treated as an int type. The symbolic names for commands and file status flags are defined by the
sys/fs/vx_ioctl.h
header file.
Notes
In some cases,
fsadm_vxfs (see fsadm_vxfs(1M)) may reorganize the extent map of a file in such a way
as to make it less contiguous. However, it does not change the geometry of a file that has a fixed extent
size.
Symbolic Names for Commands and Status Flags
The symbolic names for commands and file status flags are defined by the
sys/fs/vx_ioctl.h header
file. The available VxFS ioctls are:
• VX_FREEZE
• VX_GET_IOPARAMETERS
• VX_GETCACHE
• VX_GETEXT
• VX_GETFSOPT
• VX_SETCACHE
• VX_SETEXT
• VX_THAW
VX_FREEZE
Sync then freeze the file system. Once frozen, all further operations against the file system block
until a VX_THAW operation is received. The argument arg is a timeout value expressed in seconds.
If a VX_THAW operation is not received within the specified timeout interval, the file system performs
a VX_THAW operation automatically.
Only privileged users can run this command on the root directory of the file system.
The VX_FREEZE ioctl returns a zero if the file system is successfully frozen. If the operation fails,
the return value is -1 and the external variable errno is a general DIAGNOSTIC.
VX_GET_IOPARAMETERS
Get the I/O parameters for optimized application I/O. The argument arg points to a structure of type
vx_ioparameters as defined in sys/fs/vxio.h. The optimal I/O request sizes for applica-
tions using direct or discovered direct I/O are returned in this structure. Applications using buffered
I/O should use the
st_blksize value returned by stat for their I/O requests. The
VX_GET_IOPARAMETERS ioctl returns a zero if the parameters are successfully obtained. If the
operation fails, the return value is -1 and the external variable errno is a general DIAGNOSTIC.
The fields in the vx_ioparameters structure are:
size_t vi_read_preferred_io; /* preferred read size in bytes */
size_t vi_read_nstream; /* num of preferred reads to stream */
size_t vi_read_unit_io; /* less preferred read size in bytes */
size_t vi_write_preferred_io; /* preferred write size in bytes */
size_t vi_write_nstream; /* num of preferred writes to stream */
size_t vi_write_unit_io; /* less preferred write size in bytes */
size_t vi_pref_strength; /* strength of preferences */
228 Hewlett-Packard Company − 1 − HP-UX 11i Version 2: December 2007 Update