fio.1: update description for 'buffer_pattern' and 'verify_pattern'
[fio.git] / client.c
index af3407cefe95a55fc211d5deb92bd4687fd922fc..147ee38969d09fd146bd4754288a028041a311ee 100644 (file)
--- a/client.c
+++ b/client.c
@@ -184,6 +184,17 @@ void fio_put_client(struct fio_client *client)
        free(client);
 }
 
+static int fio_client_dec_jobs_eta(struct client_eta *eta, client_eta_op eta_fn)
+{
+       if (!--eta->pending) {
+               eta_fn(&eta->eta);
+               free(eta);
+               return 0;
+       }
+
+       return 1;
+}
+
 static void remove_client(struct fio_client *client)
 {
        assert(client->refs);
@@ -1091,14 +1102,6 @@ void fio_client_sum_jobs_eta(struct jobs_eta *dst, struct jobs_eta *je)
        strcpy((char *) dst->run_str, (char *) je->run_str);
 }
 
-void fio_client_dec_jobs_eta(struct client_eta *eta, client_eta_op eta_fn)
-{
-       if (!--eta->pending) {
-               eta_fn(&eta->eta);
-               free(eta);
-       }
-}
-
 static void remove_reply_cmd(struct fio_client *client, struct fio_net_cmd *cmd)
 {
        struct fio_net_cmd_reply *reply = NULL;
@@ -1494,9 +1497,15 @@ int fio_handle_client(struct fio_client *client)
                break;
        case FIO_NET_CMD_VTRIGGER: {
                struct all_io_list *pdu = (struct all_io_list *) cmd->payload;
-               char buf[64];
+               char buf[128];
+               int off = 0;
+
+               if (aux_path) {
+                       strcpy(buf, aux_path);
+                       off = strlen(buf);
+               }
 
-               __verify_save_state(pdu, server_name(client, buf, sizeof(buf)));
+               __verify_save_state(pdu, server_name(client, &buf[off], sizeof(buf) - off));
                exec_trigger(trigger_cmd);
                break;
                }
@@ -1573,8 +1582,10 @@ static void request_client_etas(struct client_ops *ops)
                                        (uintptr_t) eta, &client->cmd_list);
        }
 
-       while (skipped--)
-               fio_client_dec_jobs_eta(eta, ops->eta);
+       while (skipped--) {
+               if (!fio_client_dec_jobs_eta(eta, ops->eta))
+                       break;
+       }
 
        dprint(FD_NET, "client: requested eta tag %p\n", eta);
 }