#include "fio.h"
#include "hash.h"
+#include "smalloc.h"
unsigned long page_mask;
unsigned long page_size;
static inline void td_set_runstate(struct thread_data *td, int runstate)
{
+ if (td->runstate == runstate)
+ return;
+
dprint(FD_PROCESS, "pid=%d: runstate %d -> %d\n", td->pid, td->runstate,
runstate);
td->runstate = runstate;
* Add verification end_io handler, if asked to verify
* a previously written file.
*/
- if (td->o.verify != VERIFY_NONE)
+ if (td->o.verify != VERIFY_NONE && io_u->ddir == DDIR_READ) {
io_u->end_io = verify_io_u;
+ td_set_runstate(td, TD_VERIFYING);
+ } else
+ td_set_runstate(td, TD_RUNNING);
ret = td_io_queue(td, io_u);
switch (ret) {
{
long ps;
+ sinit();
+
/*
* We need locale for number printing, if it isn't set then just
* go with the US format.