X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=libfio.c;h=0f9f4e751b7476760049a73e3c5650a5e097ff1d;hp=fb7d35ae1ae5bb646f49dc6dc791bbbb74926cbe;hb=0228cfe7bb04b3c8329f8e77ee47e30e1a5a03cd;hpb=c6da2c34dee76d583cd0364988e536460a895540 diff --git a/libfio.c b/libfio.c index fb7d35ae..0f9f4e75 100644 --- a/libfio.c +++ b/libfio.c @@ -34,6 +34,7 @@ #include "os/os.h" #include "filelock.h" #include "helper_thread.h" +#include "filehash.h" /* * Just expose an empty list, if the OS does not support disk util stats @@ -134,7 +135,6 @@ void clear_io_state(struct thread_data *td, int all) void reset_all_stats(struct thread_data *td) { - struct timeval tv; int i; reset_io_counters(td, 1); @@ -148,11 +148,10 @@ void reset_all_stats(struct thread_data *td) td->rwmix_issues = 0; } - fio_gettime(&tv, NULL); - memcpy(&td->epoch, &tv, sizeof(tv)); - memcpy(&td->start, &tv, sizeof(tv)); - memcpy(&td->iops_sample_time, &tv, sizeof(tv)); - memcpy(&td->bw_sample_time, &tv, sizeof(tv)); + set_epoch_time(td, td->o.log_unix_epoch); + memcpy(&td->start, &td->epoch, sizeof(struct timeval)); + memcpy(&td->iops_sample_time, &td->epoch, sizeof(struct timeval)); + memcpy(&td->bw_sample_time, &td->epoch, sizeof(struct timeval)); lat_target_reset(td); clear_rusage_stat(td); @@ -378,6 +377,8 @@ int initialize_fio(char *envp[]) return 1; } + file_hash_init(); + /* * We need locale for number printing, if it isn't set then just * go with the US format.