Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
for_each_file(td, f, i) {
err = td_io_open_file(td, f);
for_each_file(td, f, i) {
err = td_io_open_file(td, f);
+ if (err) {
+ if (td->error == EMFILE) {
+ log_err("fio: limited open files to: %d\n", td->nr_open_files);
+ td->o.open_files = td->nr_open_files;
+ err = 0;
+ clear_error(td);
+ }
if (td->o.open_files == td->nr_open_files)
break;
if (td->o.open_files == td->nr_open_files)
break;
+static inline void clear_error(struct thread_data *td)
+{
+ td->error = 0;
+ td->verror[0] = '\0';
+}
+