Print informative error when we hit the max number of files open
[fio.git] / filesetup.c
index 0a4e77ef33e3aef63b597cc9af118d19b54a0fa9..678e8365432ad94b8b7bd9e41170204901f1eef7 100644 (file)
@@ -299,6 +299,8 @@ int generic_open_file(struct thread_data *td, struct fio_file *f)
                td_verror(td, __e, "open");
                if (__e == EINVAL && td->odirect)
                        log_err("fio: destination does not support O_DIRECT\n");
                td_verror(td, __e, "open");
                if (__e == EINVAL && td->odirect)
                        log_err("fio: destination does not support O_DIRECT\n");
+               if (__e == EMFILE)
+                       log_err("fio: try reducing/setting openfiles (failed at %u of %u)\n", td->nr_open_files, td->nr_files);
                return 1;
        }
 
                return 1;
        }