ffz() takes ints, so change the file_map to being int based
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/io_u.c b/io_u.c
index 1637b74..a6d1f1d 100644
--- a/io_u.c
+++ b/io_u.c
@@ -33,7 +33,7 @@
dprint(FD_RANDOM, "free: b=%llu, idx=%u, bit=%u\n", block, idx, bit);
- return (f->file_map[idx] & (1UL << bit)) == 0;
+ return (f->file_map[idx] & (1 << bit)) == 0;
}
/*
@@ -66,7 +66,7 @@
fio_assert(td, idx < f->num_maps);
- f->file_map[idx] |= (1UL << bit);
+ f->file_map[idx] |= (1 << bit);
block++;
blocks++;
}
@@ -108,7 +108,7 @@
i = f->last_free_lookup;
*b = (i * BLOCKS_PER_MAP);
while ((*b) * min_bs < f->real_file_size) {
- if (f->file_map[i] != -1UL) {
+ if (f->file_map[i] != (unsigned int) -1) {
*b += ffz(f->file_map[i]);
if (*b > last_block(td, f, ddir))
break;