System Interface Distributions

PVFS2 users should be able to utilize distributions effectively through the system interface. API's are exposed that allow users to create files with the user-specified distribution. In the case that no distribution is specified (i.e. the NULL distribution is specified), the default distribution, simple stripe is used. The system interface must be initialized before distributions may be accessed.

The external distribution API is exposed to users via the following data types and functions:

  struct PVFS_sys_dist;

The system interface distribution structure. It contains the distribution identifier (i.e. the name) and a pointer to an instance of the distribution parameters for this type distribution. In general, the user should not modify the data within this struct.

  int PVFS_sys_create( char* entry_name,
                       PVFS_object_ref ref,
                       PVFS_sys_attr,
                       PVFS_credentials credentials,
                       PVFS_sys_dist* dist,
                       PVFS_sysresp_create* resp );

Creates a file using the specified distribution. If no distribution is specified, the default distribution simple_stripe is used during creation. The distribution used during file creation is stored with the file and may not be changed later. Altering the distribution used to store the file contents could result in data corruption.

  PVFS_sys_dist* PVFS_sys_dist_lookup( const char* name );

Allocates a new distribution instance by copying the internal distribution registered for the supplied name. Note that the internal distribution has additional data not exposed thru the system interface, but that should be fully configurable thru the distribution parameters.

  int PVFS_sys_dist_free( PVFS_sys_dist* dist );

Deallocate all system interface resources allocated during distribution lookup.

  int PVFS_sys_dist_setparam( PVFS_sys_dist* dist,
                              const char* param,
                              void* value );

Set the distribution parameter specified by the string param to value. The strings used to specify parameters are distribution defined but should generally correspond to the field name in the distributions parameter struct. All parameters must be set before the distribution is used in file creation. Once a file is created, there is no safe way to modify the distribution parameters for that file.