Hi,
I completely agree with the proposed parameter and the potential orderings
(none, random-start, etc...). But I also agree with Walt:
>distribution, thus that really should be its own thing.
Therefore, I propose to have a new interface and new modules which does the
job, kind of a DatafileSelector.
This one is orthogonal to the actual distribution and decides on which
machines datafiles should be created. Therefore a single method could be
used like the one sam suggested + extra parameter (either a string or a
structure):
int (*get_ordering) (int incount, char *inaliases, int *outcount,
char *outaliases, struct datafile_selector_parameter_t * params);
The create caller could specify with the create call the name of the
DatafileSelector and the actual parameter (if desired).
Structure could look like:
struct datafile_selector_parameter_t{
int datafile_number; /* no of datafiles to create */
char * server_alias_list; /* list of datafile candidates, must be
contained
in inaliases array, if empty use the inaliases array */
char * extra_parameter; /* modul specific */
}
Now depending on the actual function (random, inorder, etc.) the actual server
alias list ist randomized or used inorder if specified, else the actual
available dataserver list is used directly with the same policy.
An additional parameter could be provided for the module, but I can't imagine
an potential usecase, yet.
To ease the debugging I believe an environment variable could be queried to
overide the selected DatafileSelector on the create call. This eases the
debugging of higher level API's which may set the DatafileSelector during
file creation to meet their needs. Thus, with the env. variable set
to "inorder" one should get the desired behavior.
regards,
Julian
_______________________________________________
Pvfs2-developers mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers