[PATCH] Reversed order of thinktime_blocks modulo operation
[fio.git] / fio.c
diff --git a/fio.c b/fio.c
index 28f6376dfeac917305280324aafa822ff9e9e3f8..dd52626469a0358cdbacc062d02058b19f148825 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -452,7 +452,7 @@ static void do_io(struct thread_data *td)
                        unsigned long long b;
 
                        b = td->io_blocks[0] + td->io_blocks[1];
                        unsigned long long b;
 
                        b = td->io_blocks[0] + td->io_blocks[1];
-                       if (!(td->thinktime_blocks % b))
+                       if (!(b % td->thinktime_blocks))
                                usec_sleep(td, td->thinktime);
                }
        }
                                usec_sleep(td, td->thinktime);
                }
        }