- td->stat_io_bytes[0] = td->stat_io_bytes[1] = 0;
- td->this_io_bytes[0] = td->this_io_bytes[1] = 0;
- td->stat_io_blocks[0] = td->stat_io_blocks[1] = 0;
- td->this_io_blocks[0] = td->this_io_blocks[1] = 0;
+ int ddir;
+
+ for (ddir = 0; ddir < DDIR_RWDIR_CNT; ddir++) {
+ td->stat_io_bytes[ddir] = 0;
+ td->this_io_bytes[ddir] = 0;
+ td->stat_io_blocks[ddir] = 0;
+ td->this_io_blocks[ddir] = 0;
+ td->rate_bytes[ddir] = 0;
+ td->rate_blocks[ddir] = 0;
+ td->io_issues[ddir] = 0;
+ }