backend: make it clear that we passed 'fd' to the new thread
[fio.git] / client.c
index 11fa262a6af9d2a5db68401d3d9c73ab86fc6272..3b54bfdfe6e183b5b0428d0b0fb09b2db5e0fe79 100644 (file)
--- a/client.c
+++ b/client.c
@@ -961,7 +961,7 @@ static void convert_ts(struct thread_stat *dst, struct thread_stat *src)
        dst->ss_deviation.u.f   = fio_uint64_to_double(le64_to_cpu(src->ss_deviation.u.i));
        dst->ss_criterion.u.f   = fio_uint64_to_double(le64_to_cpu(src->ss_criterion.u.i));
 
-       if (dst->ss_state & __FIO_SS_DATA) {
+       if (dst->ss_state & FIO_SS_DATA) {
                for (i = 0; i < dst->ss_dur; i++ ) {
                        dst->ss_iops_data[i] = le64_to_cpu(src->ss_iops_data[i]);
                        dst->ss_bw_data[i] = le64_to_cpu(src->ss_bw_data[i]);
@@ -1666,6 +1666,8 @@ int fio_handle_client(struct fio_client *client)
        dprint(FD_NET, "client: got cmd op %s from %s (pdu=%u)\n",
                fio_server_op(cmd->opcode), client->hostname, cmd->pdu_len);
 
+       client->last_cmd = cmd->opcode;
+
        switch (cmd->opcode) {
        case FIO_NET_CMD_QUIT:
                if (ops->quit)
@@ -1689,7 +1691,7 @@ int fio_handle_client(struct fio_client *client)
                struct cmd_ts_pdu *p = (struct cmd_ts_pdu *) cmd->payload;
 
                dprint(FD_NET, "client: ts->ss_state = %u\n", (unsigned int) le32_to_cpu(p->ts.ss_state));
-               if (le32_to_cpu(p->ts.ss_state) & __FIO_SS_DATA) {
+               if (le32_to_cpu(p->ts.ss_state) & FIO_SS_DATA) {
                        dprint(FD_NET, "client: received steadystate ring buffers\n");
 
                        size = le64_to_cpu(p->ts.ss_dur);
@@ -1940,7 +1942,10 @@ static int fio_check_clients_timed_out(void)
                else
                        log_err("fio: client %s timed out\n", client->hostname);
 
-               client->error = ETIMEDOUT;
+               if (client->last_cmd != FIO_NET_CMD_VTRIGGER)
+                       client->error = ETIMEDOUT;
+               else
+                       log_info("fio: ignoring timeout due to vtrigger\n");
                remove_client(client);
                ret = 1;
        }