+ int from_hash;
+
+ __f = lookup_file_hash(f->file_name);
+ if (__f) {
+ dprint(FD_FILE, "found file in hash %s\n", f->file_name);
+ /*
+ * racy, need the __f->lock locked
+ */
+ f->lock = __f->lock;
+ f->lock_owner = __f->lock_owner;
+ f->lock_batch = __f->lock_batch;
+ f->lock_ddir = __f->lock_ddir;
+ from_hash = 1;
+ } else {
+ dprint(FD_FILE, "file not found in hash %s\n", f->file_name);
+ from_hash = 0;
+ }
+
+ f->fd = open(f->file_name, flags, 0600);
+ return from_hash;
+}
+
+int generic_open_file(struct thread_data *td, struct fio_file *f)
+{