--- netmist.c 2020-09-28 21:55:37.479887345 -0500 +++ /tmp/netmist.c 2021-06-30 11:02:41.946437582 -0500 @@ -1528,7 +1528,7 @@ void init_tests(int); void create_tests(int); int gen_op(int,int); -void client_init_files(int); +void client_init_files(int,int); void client_init_block(char *); void client_validate_ops(void); int my_gethostname(char *, int); @@ -5182,15 +5182,24 @@ { fprintf(newstdout,"%s Abbreviated INIT phase.\n", get_timestamp(&time_string[0])); + if( sharing_flag ) + { + client_init_files(0,1); + } + else + { + client_init_files(client_id,1); + } } else { - if( sharing_flag ) { - client_init_files(0); + if( sharing_flag ) + { + client_init_files(0,0); } else { - client_init_files(client_id); + client_init_files(client_id,0); } } fprintf(newstdout,"%s Finished client init files.\n", @@ -8177,7 +8186,7 @@ * the directory structure and files. */ void -client_init_files(int client_id) +client_init_files(int client_id, int skip_init) { #if defined(WIN32) DWORD ret=0; @@ -8546,7 +8555,8 @@ } } strcpy(tmp_file.filename,dir_buf); - (*Netmist_Ops[my_workload].init_empty_file)(dir_buf); + if(!skip_init) + (*Netmist_Ops[my_workload].init_empty_file)(dir_buf); if(c_eval ==0) locked_dir = 1; /* Locked by me */ else @@ -8718,7 +8728,8 @@ if( k == OP_RMDIR) continue; /* Create an empty file. Use virtualized interface */ - (*Netmist_Ops[my_workload].init_empty_file)(buf); + if(!skip_init) + (*Netmist_Ops[my_workload].init_empty_file)(buf); empty_count++; } else @@ -8733,7 +8744,8 @@ /* No files under this one */ if( k == OP_RMDIR) continue; - (*Netmist_Ops[my_workload].init_file)(buf,k,i,j,(struct file_object *)0); + if(! skip_init) + (*Netmist_Ops[my_workload].init_file)(buf,k,i,j,(struct file_object *)0); init_file_count++; } } @@ -25079,7 +25091,7 @@ } } strcpy(fp->filename,buf); - /* Create an empty file */ + /* Create an empty file */ if(vdebug) { fprintf(newstdout,"validate: Init empty file\n"); @@ -27264,14 +27276,20 @@ client_validate_ops(); if( (skip_init == 1) && (dir_exist() == 0)) { - return; + if( sharing_flag ) + { + client_init_files(0,1); + } + else + client_init_files(client_id,1); + return; } if( sharing_flag ) { - client_init_files(0); + client_init_files(0,0); } else - client_init_files(client_id); + client_init_files(client_id,0); }