Add backend related data
[fio.git] / server.c
index ee3f7aab7143e4b97bb3f849777353508407f916..31f179493aabf949edb8870dff154f99afba19a1 100644 (file)
--- a/server.c
+++ b/server.c
@@ -601,7 +601,7 @@ static int handle_run_cmd(struct flist_head *job_list, struct fio_net_cmd *cmd)
                return 0;
        }
 
-       ret = fio_backend();
+       ret = fio_backend(NULL);
        free_threads_shm();
        _exit(ret);
 }
@@ -715,10 +715,11 @@ static int handle_send_eta_cmd(struct fio_net_cmd *cmd)
         * Fake ETA return if we don't have a local one, otherwise the client
         * will end up timing out waiting for a response to the ETA request
         */
-       je = get_jobs_eta(1, &size);
-       if (!je)
-               je = calloc(1, sizeof(*je));
-       else {
+       je = get_jobs_eta(true, &size);
+       if (!je) {
+               size = sizeof(*je);
+               je = calloc(1, size);
+       } else {
                je->nr_running          = cpu_to_le32(je->nr_running);
                je->nr_ramp             = cpu_to_le32(je->nr_ramp);
                je->nr_pending          = cpu_to_le32(je->nr_pending);
@@ -1444,7 +1445,7 @@ int fio_server_get_verify_state(const char *name, int threadnumber,
        /*
         * Wait for the backend to receive the reply
         */
-       if (fio_mutex_down_timeout(&rep->lock, 10)) {
+       if (fio_mutex_down_timeout(&rep->lock, 10000)) {
                log_err("fio: timed out waiting for reply\n");
                goto fail;
        }