[Pvfs2-cvs] commit by kunkel in pvfs2/src/client/sysint:
sys-create.sm
CVS commit program
cvs at parl.clemson.edu
Fri Jan 12 04:24:42 EST 2007
Update of /projects/cvsroot/pvfs2/src/client/sysint
In directory parlweb1:/tmp/cvs-serv5742/src/client/sysint
Modified Files:
Tag: kunkel-hint-branch
sys-create.sm
Log Message:
Bufix to set number of dfiles with hint
Index: sys-create.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/client/sysint/sys-create.sm,v
diff -p -u -r1.96.2.4 -r1.96.2.5
--- sys-create.sm 2 Dec 2006 11:20:31 -0000 1.96.2.4
+++ sys-create.sm 12 Jan 2007 09:24:42 -0000 1.96.2.5
@@ -324,18 +324,20 @@ PVFS_error PVFS_isys_create(
/* hints allow to override this behavior, e.g. for MPI */
hintvalue = PVFS_get_hint(sm_p->hints, CREATE_SET_DATAFILE_NODES);
- if (attr.mask & PVFS_ATTR_SYS_DFILE_COUNT)
- {
- num_dfiles_req = attr.dfile_count;
- }
- else if (hintvalue)
+
+ if (hintvalue)
{
- while( (hintvalue = rindex(hintvalue, ',')))
+ while( *hintvalue != 0 )
{
+ if( *hintvalue == ','){
+ num_dfiles_req++;
+ }
hintvalue++;
- num_dfiles_req++;
}
num_dfiles_req++;
+ }else if (attr.mask & PVFS_ATTR_SYS_DFILE_COUNT)
+ {
+ num_dfiles_req = attr.dfile_count;
}
else
{
@@ -737,9 +739,9 @@ static int create_datafiles_setup_msgpai
act_hostname = strtok_r(hintcpy, ",", & save_ptr);
while ( act_hostname ){
if ( tokens >= sm_p->u.create.num_data_files){
- gossip_err("Datafiles given by hint are not valid, "
+ gossip_err("Datafiles given by hint %s are not valid, "
"given by hints: %d set by create data_file_no: %d\n",
- tokens + 1, sm_p->u.create.num_data_files);
+ hintvalue, tokens + 1, sm_p->u.create.num_data_files);
js_p->error_code = -PVFS_EINVAL;
return 1;
}
More information about the Pvfs2-cvs
mailing list