HP JFS 3.3 and HP OnLineJFS 3.3 VERITAS File System 3.3 System Administrator's Guide

114 Chapter6
Application Interface
Extent Information
Extent Information
The VX_SETEXT ioctl 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 using the VX_GETEXT
ioctl (the getext command provides access to this functionality). For
details, see getext(1M), setext(1M), and vxfsio(7).
NOTE The VX_SETEXT ioctl is available only with the HP OnLineJFS product.
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:
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.
NOTE Follow this procedure carefully. Otherwise, a fixed extent size could be
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