Veritas™ File System 5.0.1 Programmer's Reference Guide
the current size of the file and the size after the operation succeeds). VX_GROWFILE
has persistent effects, but is not visible as an allocation flag. This flag is visible
through the VX_GETEXT ioctl.
Allocation flags with fixed extent size
The VX_ALIGN flag can be used to specify an allocation flag for fixed extent size.
This flag has no effect if it is specified with a reservation request. The VX_ALIGN
flag specifies the alignment requirement for allocating future extents that are
aligned on a fixed extent size boundary relative to the start of the allocation unit.
This flag can be used to align extents to disk striping boundaries or physical disk
boundaries. The VX_ALIGN flag is persistent and the VX_GETEXT ioctl returns the
flag.
How to use extent attribute APIs
First, verify that the target file system is VxFS, and then determine the file system
block size using the statfs() call. The type for VxFS is MNT_VXFS on most platforms,
and the file system block size is returned in statfs.f_bsize. The block size must be
known for setting or interpreting the extent attribute information through VxFS
extent attribute APIs.
Each invocation of the VX_SETEXT ioctl affects all the elements in the vx_ext
structure.
To use VX_SETEXT
1
Call the VX_GETEXT ioctl to read the current settings, if any.
2
Modify the current values to be changed.
3
Call the VX_SETEXT ioctl to set the new values.
Warning: Follow this procedure carefully. A fixed extent size may be inadvertently
cleared when the reservation is changed. When copying files between VxFS and
non-VxFS file systems, the extent attributes cannot be preserved. The attribute
values returned for a file in a vx_ext structure have a different effect on another
VxFS file system with a different file system block size from the source file system.
Translation of attribute values for different block sizes may be necessary when
copying files with attributes between two file systems of a different block size.
83Veritas File System I/O
Extents