Veritas™ File System 5.0.1 Programmer's Reference Guide

The space reserved for a file must be contiguous
No allocations are made for a file beyond the current reservation
An unused reservation is released when the file is closed
Space is allocated, but no reservation is assigned
The file size is changed to immediately incorporate the allocated space
Some of the extent attributes are persistent and become part of the on-disk
information about the file, while other attributes are temporary and are lost after
the file is closed or the system is rebooted. The persistent attributes are similar
to the files permissions and are written in the inode for the file. When a file is
copied, moved, or archived, only the persistent attributes of the source file are
preserved in the new file.
Reservation: preallocating space to a file
Space reservation is used to make sure applications do not fail because the file
system is out of space. An application can preallocate space for all the files it
needs before the application starts any work. By allocating space in advance, the
file is optimally allocated for performance, and file accesses are not slowed down
by the need to allocate storage. This allocation of resources can be important in
applications that require a guaranteed response time. With very large files, use
of space reservation can avoid the need to use indirect extents. It can also improve
performance and reduce fragmentation by guaranteeing that the file consists of
large contiguous extents.
VxFS provides an API to preallocate space to a file at the time of the request rather
than when data is written into the file. Preallocation, or reservation, prevents any
unexpected out-of-space condition on the file system by ensuring that a files
required space is associated with the file before data is written to the file. Storage
can be reserved for a file at any time, and reserved space to a file is not allocated
to other files in the file system. The API provides the application the option to
change the size of the file to include the reserved space.
Reservation does not perform zeroing of the allocated blocks to the file. Therefore,
this facility is limited to applications running with appropriate privileges, unless
the size of the file is not changed with the reservation request. The data that
appears in the newly allocated blocks for the file may have been previously
contained in another file.
Reservation is a persistent attribute for the file that is saved on disk. When this
attribute is set on a file, the attribute is not released when the file is truncated.
The reservation must be cleared through the same API, or the file must be removed
to free the reserved space. At the time of specifying the reservation, if the file size
Veritas File System I/O
Extents
78