Merge branch 'master' into gfio
[fio.git] / client.c
index fe1f32bf57432e6155b3bf9dd5369eb4bcd2b375..c1e516d5288d7453798d1cd8d217280d5d637bd7 100644 (file)
--- a/client.c
+++ b/client.c
@@ -401,6 +401,11 @@ static void sig_int(int sig)
        fio_clients_terminate();
 }
 
+static void sig_show_status(int sig)
+{
+       show_running_run_stats();
+}
+
 static void client_signal_handler(void)
 {
        struct sigaction act;
@@ -414,6 +419,11 @@ static void client_signal_handler(void)
        act.sa_handler = sig_int;
        act.sa_flags = SA_RESTART;
        sigaction(SIGTERM, &act, NULL);
+
+       memset(&act, 0, sizeof(act));
+       act.sa_handler = sig_show_status;
+       act.sa_flags = SA_RESTART;
+       sigaction(SIGUSR1, &act, NULL);
 }
 
 static int send_client_cmd_line(struct fio_client *client)
@@ -836,6 +846,7 @@ static void convert_jobs_eta(struct jobs_eta *je)
        je->elapsed_sec         = le64_to_cpu(je->elapsed_sec);
        je->eta_sec             = le64_to_cpu(je->eta_sec);
        je->nr_threads          = le32_to_cpu(je->nr_threads);
+       je->is_pow2             = le32_to_cpu(je->is_pow2);
 }
 
 void fio_client_sum_jobs_eta(struct jobs_eta *dst, struct jobs_eta *je)
@@ -956,9 +967,9 @@ static void handle_probe(struct fio_client *client, struct fio_net_cmd *cmd)
 
        sprintf(bit, "%d-bit", probe->bpp * 8);
 
-       log_info("hostname=%s, be=%u, %s, os=%s, arch=%s, fio=%u.%u.%u\n",
+       log_info("hostname=%s, be=%u, %s, os=%s, arch=%s, fio=%s\n",
                probe->hostname, probe->bigendian, bit, os, arch,
-               probe->fio_major, probe->fio_minor, probe->fio_patch);
+               probe->fio_version);
 
        if (!client->name)
                client->name = strdup((char *) probe->hostname);
@@ -1187,8 +1198,8 @@ int fio_handle_client(struct fio_client *client)
                free(cmd);
                break;
        case FIO_NET_CMD_UPDATE_JOB:
-               remove_reply_cmd(client, cmd);
                ops->update_job(client, cmd);
+               remove_reply_cmd(client, cmd);
                free(cmd);
                break;
        default: