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 7fdae2babad7b6f9894b59852a3350aff3c0a5a1..928f7d38be47aa19ba5cdebc207dc268ca986695 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->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)
 }
 
 static void handle_stop(struct fio_client *client, struct fio_net_cmd *cmd)
index 5be84b60f638bb7f30a843c1b960b20a947a4ab9..d632f468f714114102e88657da73a1f45123a516 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;
        int is_sock;
        int disk_stats_shown;
        unsigned int jobs;
+       unsigned int nr_stat;
        int error;
        int signal;
        int ipv6;
        int error;
        int signal;
        int ipv6;