--- /tmp/netmist.c 2021-06-24 09:05:48.077851796 -0500 +++ netmist.c 2021-06-24 08:59:33.065339275 -0500 @@ -799,7 +799,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); @@ -4345,22 +4345,26 @@ { /* - * If we're skipping initialization, we still need to walk down to - * get our working directory, which would ordinarily be a - * side-effect of client_init_files. Instead, do just that piece here. - */ - - setup_workdir (cmdline.client_id, 0); + * Need to set the skip flag for client_init_files to fill in the file sizes in memory + */ + if (cmdline.sharing_flag) + { + client_init_files (0,1); + } + else + { + client_init_files (cmdline.client_id,1); + } } else { if (cmdline.sharing_flag) { - client_init_files (0); + client_init_files (0,0); } else { - client_init_files (cmdline.client_id); + client_init_files (cmdline.client_id,0); } } log_file (LOG_EXEC, "Finished client init files.\n"); @@ -7646,7 +7650,7 @@ * __doc__ */ void -client_init_files (int client_id) +client_init_files (int client_id, int skip) { #if defined(WIN32) DWORD ret = 0; @@ -7802,7 +7806,15 @@ log_file (LOG_EXEC, "Client %d: client_dirs: %d\n", client_id, cmdline.client_dirs); - setup_workdir (client_id, 1); + /* Skip creation of directories, if skip == 1*/ + if(skip) + { + setup_workdir (client_id, 0); + } + else + { + setup_workdir (client_id, 1); + } for (k = 0; k < NUM_OP_TYPES; k++) { @@ -8161,7 +8173,8 @@ if (k == OP_RMDIR) continue; /* Create an empty file. Use virtualized interface */ - (*Netmist_Ops[my_workload].init_empty_file) (kdir, + if(!skip) + (*Netmist_Ops[my_workload].init_empty_file) (kdir, leaf_name); empty_count++; } @@ -8179,7 +8192,8 @@ */ if (k == OP_RMDIR) continue; - (*Netmist_Ops[my_workload].init_file) (k, file_ptr); + if(!skip) + (*Netmist_Ops[my_workload].init_file) (k, file_ptr); } } } @@ -8488,7 +8502,9 @@ vds = vfst->netmist_vfs_direct_size (vfsr); *ds = (*ds / vds) * vds; if (nozero && (*ds == 0)) + { *ds = vds; + } } return od; } @@ -10441,7 +10457,7 @@ { const char *nes = netmist_vfs_errstr (err); log_file (LOG_EXEC, - "Generic read op failed file %s in %s: Error %s, Error value %d Ret %d Flags 0x%x Trans 0x%x Offset 0x%llx\n", + "Generic read op failed file %s in %s: Error %s, Error value %d Flags 0x%x Trans 0x%x Offset 0x%llx\n", fp->relfilename, VFS (pathptr, fp->dir), nes, err, flags, trans, fp->seqread_offset); @@ -18533,15 +18549,26 @@ client_validate_ops (); if ((cmdline.skip_init == 1) && (dir_exist () == 0)) { + /* + * Need to call the _skip version of client_init_files to fill in the file sizes in memory + */ + if (cmdline.sharing_flag) + { + client_init_files (0,1); + } + else + { + client_init_files (cmdline.client_id,1); + } return; } if (cmdline.sharing_flag) { - client_init_files (0); + client_init_files (0,0); } else { - client_init_files (cmdline.client_id); + client_init_files (cmdline.client_id,0); } } --- /tmp/netmist_version.c 2021-06-24 09:05:54.013891567 -0500 +++ netmist_version.c 2021-06-24 09:01:42.189204383 -0500 @@ -1,4 +1,4 @@ #include "netmist_version.h" -char *git_date = "Tue Nov 3 16:41:01 CST 2020"; -char *git_sha = "b14f6dd081899c693e96da008b2fec8d51d70757"; -char *git_version = "$Revision: 2511 $"; +char *git_date = "Thu Jun 24 09:01:42 CDT 2021"; +char *git_sha = "270603e00abfe728f5f7e4970ce5b662319f590a"; +char *git_version = "$Revision: 2516 $";