Mark it as done when we close it, so we don't open the same
one again.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
FIO_FILE_EXISTS = 1 << 3, /* file there */
FIO_FILE_EXTEND = 1 << 4, /* needs extend */
FIO_FILE_NOSORT = 1 << 5, /* don't sort verify blocks */
+ FIO_FILE_DONE = 1 << 6, /* io completed to this file */
};
/*
fno = (unsigned int) ((double) td->o.nr_files * (r / (RAND_MAX + 1.0)));
f = &td->files[fno];
+ if (f->flags & FIO_FILE_DONE)
+ continue;
if ((!goodf || (f->flags & goodf)) && !(f->flags & badf))
return f;
if (td->next_file >= td->o.nr_files)
td->next_file = 0;
+ if (f->flags & FIO_FILE_DONE)
+ continue;
+
if ((!goodf || (f->flags & goodf)) && !(f->flags & badf))
break;
*/
io_u->file = NULL;
td_io_close_file(td, f);
+ f->flags |= FIO_FILE_DONE;
/*
* probably not the right place to do this, but see