Merge branch 'openbsd_swap' of https://github.com/bsdkurt/fio
[fio.git] / client.c
index e0047af06a3e97f6bdd57caeb4b3ebbd823956cd..4aed39e795ca0a8248f33a09ea1209afe007bf94 100644 (file)
--- a/client.c
+++ b/client.c
@@ -960,6 +960,7 @@ static void convert_ts(struct thread_stat *dst, struct thread_stat *src)
                convert_io_stat(&dst->bw_stat[i], &src->bw_stat[i]);
                convert_io_stat(&dst->iops_stat[i], &src->iops_stat[i]);
        }
+       convert_io_stat(&dst->sync_stat, &src->sync_stat);
 
        dst->usr_time           = le64_to_cpu(src->usr_time);
        dst->sys_time           = le64_to_cpu(src->sys_time);
@@ -994,8 +995,13 @@ static void convert_ts(struct thread_stat *dst, struct thread_stat *src)
                for (j = 0; j < FIO_IO_U_PLAT_NR; j++)
                        dst->io_u_plat[i][j] = le64_to_cpu(src->io_u_plat[i][j]);
 
-       for (i = 0; i < DDIR_RWDIR_CNT; i++) {
+       for (j = 0; j < FIO_IO_U_PLAT_NR; j++)
+               dst->io_u_sync_plat[j] = le64_to_cpu(src->io_u_sync_plat[j]);
+
+       for (i = 0; i < DDIR_RWDIR_SYNC_CNT; i++)
                dst->total_io_u[i]      = le64_to_cpu(src->total_io_u[i]);
+
+       for (i = 0; i < DDIR_RWDIR_CNT; i++) {
                dst->short_io_u[i]      = le64_to_cpu(src->short_io_u[i]);
                dst->drop_io_u[i]       = le64_to_cpu(src->drop_io_u[i]);
        }
@@ -1026,6 +1032,14 @@ static void convert_ts(struct thread_stat *dst, struct thread_stat *src)
        dst->nr_block_infos     = le64_to_cpu(src->nr_block_infos);
        for (i = 0; i < dst->nr_block_infos; i++)
                dst->block_infos[i] = le32_to_cpu(src->block_infos[i]);
+       for (i = 0; i < DDIR_RWDIR_CNT; i++) {
+               for (j = 0; j < FIO_IO_U_PLAT_NR; j++) {
+                       dst->io_u_plat_high_prio[i][j] = le64_to_cpu(src->io_u_plat_high_prio[i][j]);
+                       dst->io_u_plat_prio[i][j] = le64_to_cpu(src->io_u_plat_prio[i][j]);
+               }
+               convert_io_stat(&dst->clat_high_prio_stat[i], &src->clat_high_prio_stat[i]);
+               convert_io_stat(&dst->clat_prio_stat[i], &src->clat_prio_stat[i]);
+       }
 
        dst->ss_dur             = le64_to_cpu(src->ss_dur);
        dst->ss_state           = le32_to_cpu(src->ss_state);
@@ -1151,6 +1165,10 @@ static void handle_job_opt(struct fio_client *client, struct fio_net_cmd *cmd)
                struct flist_head *opt_list = &client->opt_lists[pdu->groupid];
 
                flist_add_tail(&p->list, opt_list);
+       } else {
+               free(p->value);
+               free(p->name);
+               free(p);
        }
 }
 
@@ -1683,7 +1701,7 @@ static struct cmd_iolog_pdu *convert_iolog(struct fio_net_cmd *cmd,
 
                s->time         = le64_to_cpu(s->time);
                s->data.val     = le64_to_cpu(s->data.val);
-               s->__ddir       = le32_to_cpu(s->__ddir);
+               s->__ddir       = __le32_to_cpu(s->__ddir);
                s->bs           = le64_to_cpu(s->bs);
 
                if (ret->log_offset) {