From: Jens Axboe Date: Sat, 1 Mar 2008 17:59:51 +0000 (+0100) Subject: Hook up the file hashing X-Git-Tag: fio-1.20-rc1~11 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=4906e0b57f2b8cbad02ef2428522281cf6038bdd;ds=sidebyside Hook up the file hashing Add on file open, remove on close. Signed-off-by: Jens Axboe --- diff --git a/filesetup.c b/filesetup.c index bae7526a..e2c71cd0 100644 --- a/filesetup.c +++ b/filesetup.c @@ -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);