+uint64_t iolog_nr_samples(struct io_log *iolog)
+{
+ struct flist_head *entry;
+ uint64_t ret = 0;
+
+ flist_for_each(entry, &iolog->io_logs) {
+ struct io_logs *cur_log;
+
+ cur_log = flist_entry(entry, struct io_logs, list);
+ ret += cur_log->nr_samples;
+ }
+
+ return ret;
+}
+
+static int __write_log(struct thread_data *td, struct io_log *log, int try)
+{
+ if (log)
+ return finish_log(td, log, try);
+
+ return 0;
+}
+
+static int write_iops_log(struct thread_data *td, int try, bool unit_log)
+{
+ int ret;
+
+ if (per_unit_log(td->iops_log) != unit_log)