About named data streams

Named data streams associate multiple data streams with a file. The default unnamed data stream can be accessed through the file descriptor returned by the open() function called on the file name. The other data streams are stored in an alternate name space associated with the file.


Named data streams are also known as named attributes.

Figure: Alternate Namespace illustrates the alternate namespace associated with a file.

Figure: Alternate Namespace

Alternate Namespace

The file1 file has two named data streams: data_stream_1 and data_stream_2.

Every file can have its own alternate namespace to store named data streams. The alternate namespace can be accessed through the named data stream APIs supported by VxFS.

Access to the named data stream can be done through a file descriptor using the named data stream library functions. Applications can open the named data stream to obtain a file descriptor and perform read(), write(), and mmap() operations using the file descriptor. These system calls work as though they are operating on a regular file. The named data streams of a file are stored in a hidden named data stream directory inode associated with the file. The hidden directory inode for the file can be accessed only through the named data stream application programming interface.

There are no VxFS-supplied administrative commands to use this feature. A VxFS API is provided for creating, reading, and writing the named data streams of a file.