get_next_free_block() would generate offset that were larger than the
requested size, either causing failures or just causing the test
to exit prematurely.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
i = f->last_free_lookup;
*b = (i * BLOCKS_PER_MAP);
- while ((*b) * min_bs < f->real_file_size) {
+ while ((*b) * min_bs < f->real_file_size &&
+ (*b) * min_bs < f->io_size) {
if (f->file_map[i] != (unsigned int) -1) {
*b += ffz(f->file_map[i]);
if (*b > last_block(td, f, ddir))