Fix end-of-job slowdown for random IO with a random map
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
diff --git a/fio.h b/fio.h
index d2cca11..08f1733 100644
--- a/fio.h
+++ b/fio.h
@@ -531,7 +531,7 @@
assert(!(io_u->ddir == DDIR_WRITE && !td_write(td)));
}
-#define BLOCKS_PER_MAP (8 * sizeof(int))
+#define BLOCKS_PER_MAP (8 * sizeof(unsigned long))
#define TO_MAP_BLOCK(f, b) (b)
#define RAND_MAP_IDX(f, b) (TO_MAP_BLOCK(f, b) / BLOCKS_PER_MAP)
#define RAND_MAP_BIT(f, b) (TO_MAP_BLOCK(f, b) & (BLOCKS_PER_MAP - 1))