log: fix use-after-free
[fio.git] / iolog.h
diff --git a/iolog.h b/iolog.h
index b387f48d1600b651a47f7969e0ab3c9ea8ffe49b..f97d91f792f717f2d4286e2ac9374939e832ba8f 100644 (file)
--- a/iolog.h
+++ b/iolog.h
@@ -48,10 +48,12 @@ struct io_log {
        /*
         * Entries already logged
         */
-       unsigned long nr_samples;
-       unsigned long max_samples;
+       uint64_t nr_samples;
+       uint64_t max_samples;
        void *log;
 
+       char *filename;
+
        unsigned int log_type;
 
        /*
@@ -167,8 +169,9 @@ extern void add_iops_sample(struct thread_data *, enum fio_ddir, unsigned int,
                                struct timeval *);
 extern void init_disk_util(struct thread_data *);
 extern void update_rusage_stat(struct thread_data *);
-extern void setup_log(struct io_log **, unsigned long, int, int);
-extern void __finish_log(struct io_log *, const char *);
+extern void setup_log(struct io_log **, unsigned long, int, int, const char *);
+extern void __finish_log(struct io_log *);
+extern void free_log(struct io_log *);
 extern struct io_log *agg_io_log[DDIR_RWDIR_CNT];
 extern int write_bw_log;
 extern void add_agg_sample(unsigned long, enum fio_ddir, unsigned int);