Veritas File System 4.1 Administrator's Guide (HP-UX 11i v3, February 2007)

Application Interface
Extent Information
Chapter 464
Extent Information
The VX_SETEXT ioctl command allows an application to reserve space for a file, and set fixed extent
sizes and file allocation flags. Applications can obtain status information on VxFS ioctls by using the
VX_GETEXT ioctl. The getext command also provides access to this information. See the getext (1),
setext (1), and vxfsio (7) manual pages for more information.
The VX_SETEXT ioctl command allows an application to reserve space for a file, and set fixed extent
sizes and file allocation flags. The current state of much of this information can be obtained by applications
by using the VX_GETEXT ioctl (the getext command provides access to this functionality). For details,
see the getext (1), setext (1), and vxfsio (7) manual pages.
Each invocation of the VX_SETEXT ioctl affects all the elements in the vx_ext structure. When using
VX_SETEXT, always use the following procedure:
To use VX_SETEXT
Step 1. Use VX_GETEXT to read the current settings.
Step 2. Modify the values to be changed.
Step 3. Call VX_SETEXT to set the values.
CAUTION Follow this procedure carefully. A fixed extent size may be inadvertently
cleared when the reservation is changed.
Space Reservation
Storage can be reserved for a file at any time. When a VX_SETEXT ioctl is issued, the reservation value is
set in the inode on disk. If the file size is less than the reservation amount, the kernel allocates space to the
file from the current file size up to the reservation amount. When the file is truncated, space below the
reserved amount is not freed. The VX_TRIM, VX_NOEXTEND, VX_CHGSIZE, VX_NORESERVE and
VX_CONTIGUOUS flags can be used to modify reservation requests.
NOTE VX_NOEXTEND is the only one of these flags that is persistent; the other flags may have
persistent effects, but they are not returned by the VX_GETEXT ioctl.