size_t orig_buffer_size;
volatile int runstate;
volatile bool terminate;
- bool last_was_sync;
- enum fio_ddir last_ddir;
+
+ enum fio_ddir last_ddir_completed;
+ enum fio_ddir last_ddir_issued;
int mmapfd;
static inline bool should_fsync(struct thread_data *td)
{
- if (td->last_was_sync)
+ if (ddir_sync(td->last_ddir_issued))
return false;
if (td_write(td) || td->o.override_sync)
return true;
TD_NR,
};
-#define TD_ENG_FLAG_SHIFT 18
-#define TD_ENG_FLAG_MASK ((1ULL << 18) - 1)
+#define TD_ENG_FLAG_SHIFT (__TD_F_LAST)
+#define TD_ENG_FLAG_MASK ((1ULL << (__TD_F_LAST)) - 1)
static inline void td_set_ioengine_flags(struct thread_data *td)
{