Next | Prev | Up | Top | Contents | Index
Real-Time Subvolumes
Files created on the real-time subvolume of an XLV logical volume are known as real-time files. The next three sections describe the special characteristics of these files.
Files on the Real-Time Subvolume and Commands
Real-time files have some special characteristics that cause standard IRIX commands to operate in ways that you might not expect. In particular:
- You cannot create real-time files using any standard commands. Only specially written programs can create real-time files. The next section, "File Creation on the Real-Time Subvolume," explains how.
- Real-time files are displayed by ls, just as any other file. However, there is no way to tell from the ls output whether a particular file is on a data subvolume or is a real-time file on a real-time subvolume. Only a specially written program can determine the type of a file. The F_FSGETXATTR fcntl() system call can determine if a file is a real-time or a standard data file. If the file is a real-time file, the fsx_xflags field of the fsxattr structure has the XFS_XFLAG_REALTIME bit set.
- The df command displays the disk space in the data subvolume by default. When the -r option is given, the real-time subvolume's disk space and usage is added. df can report that there is free disk space in the filesystem when the real-time subvolume is full, and df -r can report that there is free disk space when the data subvolume is full.
File Creation on the Real-Time Subvolume
To create a real-time file, use the F_FSSETXATTR fcntl() system call with the XFS_XFLAG_REALTIME bit set in the fsx_xflags field of the fsxattr structure. This must be done after the file has first been created/opened for writing, but before any data has been written to the file. Once data has been written to a file, the file cannot be changed from a standard data file to a real-time file, nor can files created as real-time files be changed to standard data files.
Real-time files can only be read or written using direct I/O. Therefore, read() and write() system call operations to a real-time file must meet the requirements specified by the F_DIOINFO fcntl() system call. See the open(2) reference page for a discussion of the O_DIRECT option to the open() system call.
Guaranteed-Rate I/O and the Real-Time Subvolume
The real-time subvolume is used by applications for files that require fixed I/O rates. This feature, called guaranteed-rate I/O, is described in Chapter 9, "System Administration for Guaranteed-Rate I/O."
Next | Prev | Up | Top | Contents | Index