summaryrefslogtreecommitdiff
path: root/filehash.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-05-23 11:55:53 +0200
committerJens Axboe <jens.axboe@oracle.com>2008-05-23 11:55:53 +0200
commit5e1d306e4f9a6337d07cc2d536d77c53e083226f (patch)
tree801ad4becc3f79a884134b500d0883bd3d8ca2a1 /filehash.c
parent868eb3cc388f4f34a68a633a1cf8b036c4dcc47a (diff)
downloadfio-5e1d306e4f9a6337d07cc2d536d77c53e083226f.tar.gz
fio-5e1d306e4f9a6337d07cc2d536d77c53e083226f.tar.bz2
Add job number specific dumping and fix atexit() error
The threads/process jobs should use _exit() so they don't run the main atexit() function. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'filehash.c')
-rw-r--r--filehash.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/filehash.c b/filehash.c
index b459220b..54cea990 100644
--- a/filehash.c
+++ b/filehash.c
@@ -79,6 +79,23 @@ struct fio_file *add_file_hash(struct fio_file *f)
return alias;
}
+void file_hash_exit(void)
+{
+ unsigned int i, has_entries = 0;
+
+ fio_mutex_down(hash_lock);
+ for (i = 0; i < HASH_BUCKETS; i++)
+ has_entries += !list_empty(&file_hash[i]);
+ fio_mutex_up(hash_lock);
+
+ if (has_entries)
+ log_err("fio: file hash not empty on exit\n");
+
+ file_hash = NULL;
+ fio_mutex_remove(hash_lock);
+ hash_lock = NULL;
+}
+
void file_hash_init(void *ptr)
{
unsigned int i;