client: partial revert of 9899aff3e345
authorJens Axboe <axboe@fb.com>
Mon, 13 Oct 2014 17:33:27 +0000 (11:33 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 13 Oct 2014 17:33:27 +0000 (11:33 -0600)
We do need the client->nr_stat, otherwise things break when
group reporting is not used. We need it to keep track of
how many thread_stat's we are expecting to receive from
each client.

Signed-off-by: Jens Axboe <axboe@fb.com>
client.c
client.h

index 7fdae2b..928f7d3 100644 (file)
--- a/client.c
+++ b/client.c
@@ -1154,8 +1154,9 @@ static void handle_start(struct fio_client *client, struct fio_net_cmd *cmd)
 
        client->state = Client_started;
        client->jobs = le32_to_cpu(pdu->jobs);
+       client->nr_stat = le32_to_cpu(pdu->stat_outputs);
 
-       sum_stat_clients++;
+       sum_stat_clients += client->nr_stat;
 }
 
 static void handle_stop(struct fio_client *client, struct fio_net_cmd *cmd)
index 5be84b6..d632f46 100644 (file)
--- a/client.h
+++ b/client.h
@@ -47,6 +47,7 @@ struct fio_client {
        int is_sock;
        int disk_stats_shown;
        unsigned int jobs;
+       unsigned int nr_stat;
        int error;
        int signal;
        int ipv6;