X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=ioengines.c;h=9d7453bafcaef77ce32b64d76d99c5d033600555;hp=a395da15a95c113fb241981eb84b1fc32c009fd0;hb=b5af82930ccfd7dda6a1b11794efb452eb76d8dc;hpb=7bdce1bde82e37c8876270853840c1d09d760b67 diff --git a/ioengines.c b/ioengines.c index a395da15..9d7453ba 100644 --- a/ioengines.c +++ b/ioengines.c @@ -257,3 +257,20 @@ int td_io_commit(struct thread_data *td) return 0; } + +int td_io_open_file(struct thread_data *td, struct fio_file *f) +{ + if (!td->io_ops->open_file(td, f)) { + td->nr_open_files++; + return 0; + } + + return 1; +} + +void td_io_close_file(struct thread_data *td, struct fio_file *f) +{ + if (td->io_ops->close_file) + td->io_ops->close_file(td, f); + td->nr_open_files--; +}