Fix end-of-job slowdown for random IO with a random map
[fio.git] / filesetup.c
index d05050647ddbbcc78b1b22d59c91e8f7444d7b43..0454cc4007936611ac53bad147b7f06b2afd2faa 100644 (file)
@@ -812,7 +812,7 @@ int init_random_map(struct thread_data *td)
                                (unsigned long long) td->o.rw_min_bs;
                num_maps = (blocks + BLOCKS_PER_MAP - 1) /
                                (unsigned long long) BLOCKS_PER_MAP;
-               f->file_map = smalloc(num_maps * sizeof(int));
+               f->file_map = smalloc(num_maps * sizeof(unsigned long));
                if (f->file_map) {
                        f->num_maps = num_maps;
                        continue;