Please enter search query.
Search <book_title>...
Veritas™ File System Programmer's Reference Guide - Solaris
Last Published:
2018-08-24
Product(s):
InfoScale & Storage Foundation (7.2)
Platform: Solaris
- Veritas File System software developer's kit
- File Change Log
- About the File Change Log file
- Record types
- File Change Log tunables
- Application programming interface for File Change Log
- API functions
- File Change Log record
- Copying File Change Log records
- Veritas File System and File Change Log upgrade and downgrade
- Reverse path name lookup
- Multi-volume support
- Named data streams
- Veritas File System I/O
- Caching advisories
- Extents
- Thin Reclamation
Setting fixed extent size
The following is an example code snippet for setting the fixed extent size of the MY_PREFERRED_EXTSIZE attribute on a new file, MY_FILE
, assuming MY_PREFFERED_EXTSIZE is multiple of the file system block size:
#include <sys/fs/vx_ioctl.h> struct vx_ext myext; fd = open(MY_FILE, O_CREAT, 0644); myext.ext_size = MY_PREFERRED_EXTSIZE; myext.reserve = 0; myext.flags = 0; error = ioctl(fd, VX_SETEXT, &myext);
The following is an example code snippet for preallocating MY_FILESIZE_IN_BYTES bytes of space on the new file, MY_FILE
, assuming that the target file system block size is THIS_FS_BLOCKSIZE:
#include <sys/fs/vx_ioctl.h> struct vx_ext myext; fd = open(MY_FILE, O_CREAT, 0644); myext.ext_size =0; myext.reserve = (MY_FILESIZE_IN_BYTES + THIS_FS_BLOCKSIZE) /THIS_FS_BLOCKSIZE; myext.flags = VX_CHGSIZE; error = ioctl(fd, VX_SETEXT, &myext);