TD_INITIALIZED,
TD_RUNNING,
TD_VERIFYING,
+ TD_FSYNCING,
TD_EXITED,
TD_REAPED,
};
struct timeval s, e;
unsigned long usec;
+ td_set_runstate(td, TD_RUNNING);
+
while (td->this_io_bytes[td->ddir] < td->io_size) {
struct timespec ts = { .tv_sec = 0, .tv_nsec = 0};
struct timespec *timeout;
if (td->cur_depth)
cleanup_pending_aio(td);
- if (should_fsync(td) && td->end_fsync)
+ if (should_fsync(td) && td->end_fsync) {
+ td_set_runstate(td, TD_FSYNCING);
sync_td(td);
+ }
}
static void cleanup_io(struct thread_data *td)
case TD_VERIFYING:
c = 'V';
break;
+ case TD_FSYNCING:
+ c = 'F';
+ break;
case TD_CREATED:
c = 'C';
break;
eta_sec = INT_MAX;
} else {
/*
- * thread is already done
+ * thread is already done or waiting for fsync
*/
eta_sec = 0;
}
for (i = 0; i < thread_number; i++) {
struct thread_data *td = &threads[i];
- if (td->runstate == TD_RUNNING || td->runstate == TD_VERIFYING){
+ if (td->runstate == TD_RUNNING || td->runstate == TD_VERIFYING||
+ td->runstate == TD_FSYNCING) {
nr_running++;
t_rate += td->rate;
m_rate += td->ratemin;