Streamline thread_data data direction setting and checking
Currently it's a mess of ->ddir, ->iomix and ->sequential. Add
a TD_DDIR_* for each of these, so we can store them as one value.
A prerequisite for the next parsing cleanup.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/eta.c b/eta.c
index 8e17d20..960bf4d 100644
--- a/eta.c
+++ b/eta.c
@@ -26,20 +26,20 @@
break;
case TD_RUNNING:
if (td_rw(td)) {
- if (td->sequential)
- c = 'M';
- else
+ if (td_random(td))
c = 'm';
+ else
+ c = 'M';
} else if (td_read(td)) {
- if (td->sequential)
- c = 'R';
- else
+ if (td_random(td))
c = 'r';
- } else {
- if (td->sequential)
- c = 'W';
else
+ c = 'R';
+ } else {
+ if (td_random(td))
c = 'w';
+ else
+ c = 'W';
}
break;
case TD_VERIFYING: