Hook up the file hashing
[fio.git] / filesetup.c
index bae7526a168ed431392b09f838fe5e5997ab2006..e2c71cd05784f40b294757969c0d57dd73b4cb42 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "fio.h"
 #include "smalloc.h"
+#include "filehash.h"
 
 static int root_warn;
 
@@ -215,6 +216,9 @@ int generic_close_file(struct thread_data fio_unused *td, struct fio_file *f)
        int ret = 0;
 
        dprint(FD_FILE, "fd close %s\n", f->file_name);
+
+       remove_file_hash(f);
+
        if (close(f->fd) < 0)
                ret = errno;
 
@@ -292,6 +296,8 @@ open_again:
        if (get_file_size(td, f))
                goto err;
 
+       add_file_hash(f);
+
        return 0;
 err:
        close(f->fd);