PVFS2 Objects

At this time the type of an object is stored in at least one place, the dataspace attributes. These can be retrieved using job_trove_dspace_getattr. Additionally, as we will see, directories and metafiles store metadata as keyvals.

Directories are of type PVFS_TYPE_DIRECTORY. They are actually stored as two dataspaces in the current implementation. The first dataspace is used solely to store the attributes of the directory (under the key metadata, as a PVFS_object_attr structure) and, if entries have been created, the handle of a second dataspace where the directory entries are stored (under the key dir_ent, as a PVFS_handle type). The second dataspace is marked as type PVFS_TYPE_DIRDATA to differentiate it. This one holds the directory entries, with keys being short names of files in the directory and values being the corresponding handle (stored as a PVFS_handle type). This dataspace is created lazily when the first entry is created (in the crdirent state machine).

Metafiles are made up of a single dataspace and are of type PVFS_TYPE_METAFILE. Basic attributes are stored in a keyval under the key metadata, as a PVFS_object_attr structure, just as in the directory case. An additional keyval (datafile_handles) stores the array of datafile handles as PVFS_handle types. A final keyval (metafile_dist) stores the distribution information (in some arbitrary format at this time).

Datafiles are made up of a single Trove dataspace of type PVFS_TYPE_DATAFILE. Currently there are no attributes stored for datafiles, and all data is stored in the bstream.

Symlinks are not currently implemented, but the intention is to use a keyval to hold the target of the link.