static struct json_array *clients_array = NULL;
static struct json_array *du_array = NULL;
+static int error_clients;
+
#define FIO_CLIENT_HASH_BITS 7
#define FIO_CLIENT_HASH_SZ (1 << FIO_CLIENT_HASH_BITS)
#define FIO_CLIENT_HASH_MASK (FIO_CLIENT_HASH_SZ - 1)
if (!client->did_stat)
sum_stat_clients--;
+ if (client->error)
+ error_clients++;
+
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);
fio_clients_terminate();
}
-static void sig_show_status(int sig)
-{
- show_running_run_stats();
-}
-
static void client_signal_handler(void)
{
struct sigaction act;
dst->latency_target = le64_to_cpu(src->latency_target);
dst->latency_window = le64_to_cpu(src->latency_window);
dst->latency_percentile.u.f = fio_uint64_to_double(le64_to_cpu(src->latency_percentile.u.i));
+
+ dst->nr_block_infos = le64_to_cpu(src->nr_block_infos);
+ for (i = 0; i < dst->nr_block_infos; i++)
+ dst->block_infos[i] = le32_to_cpu(src->block_infos[i]);
}
static void convert_gs(struct group_run_stats *dst, struct group_run_stats *src)
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;
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;
- __verify_save_state(pdu, server_name(client, buf, sizeof(buf)));
+ if (aux_path) {
+ strcpy(buf, aux_path);
+ off = strlen(buf);
+ }
+
+ __verify_save_state(pdu, server_name(client, &buf[off], sizeof(buf) - off));
exec_trigger(trigger_cmd);
break;
}
(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);
}
else
log_err("fio: client %s timed out\n", client->hostname);
+ client->error = ETIMEDOUT;
remove_client(client);
ret = 1;
}
fio_client_json_fini();
free(pfds);
- return retval;
+ return retval || error_clients;
}