projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gettime-thread: fix failure to check setaffinity return value
[fio.git]
/
client.c
diff --git
a/client.c
b/client.c
index 5b409fea4b78c187ef03ae0ad287026b3e0cfb9d..3b54bfdfe6e183b5b0428d0b0fb09b2db5e0fe79 100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-942,6
+942,8
@@
static void convert_ts(struct thread_stat *dst, struct thread_stat *src)
dst->kb_base = le32_to_cpu(src->kb_base);
dst->unit_base = le32_to_cpu(src->unit_base);
dst->kb_base = le32_to_cpu(src->kb_base);
dst->unit_base = le32_to_cpu(src->unit_base);
+ dst->sig_figs = le32_to_cpu(src->sig_figs);
+
dst->latency_depth = le32_to_cpu(src->latency_depth);
dst->latency_target = le64_to_cpu(src->latency_target);
dst->latency_window = le64_to_cpu(src->latency_window);
dst->latency_depth = le32_to_cpu(src->latency_depth);
dst->latency_target = le64_to_cpu(src->latency_target);
dst->latency_window = le64_to_cpu(src->latency_window);
@@
-959,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));
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]);
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]);
@@
-982,6
+984,7
@@
static void convert_gs(struct group_run_stats *dst, struct group_run_stats *src)
dst->kb_base = le32_to_cpu(src->kb_base);
dst->unit_base = le32_to_cpu(src->unit_base);
dst->kb_base = le32_to_cpu(src->kb_base);
dst->unit_base = le32_to_cpu(src->unit_base);
+ dst->sig_figs = le32_to_cpu(src->sig_figs);
dst->groupid = le32_to_cpu(src->groupid);
dst->unified_rw_rep = le32_to_cpu(src->unified_rw_rep);
}
dst->groupid = le32_to_cpu(src->groupid);
dst->unified_rw_rep = le32_to_cpu(src->unified_rw_rep);
}
@@
-1167,6
+1170,7
@@
static void convert_jobs_eta(struct jobs_eta *je)
je->nr_threads = le32_to_cpu(je->nr_threads);
je->is_pow2 = le32_to_cpu(je->is_pow2);
je->unit_base = le32_to_cpu(je->unit_base);
je->nr_threads = le32_to_cpu(je->nr_threads);
je->is_pow2 = le32_to_cpu(je->is_pow2);
je->unit_base = le32_to_cpu(je->unit_base);
+ je->sig_figs = le32_to_cpu(je->sig_figs);
}
void fio_client_sum_jobs_eta(struct jobs_eta *dst, struct jobs_eta *je)
}
void fio_client_sum_jobs_eta(struct jobs_eta *dst, struct jobs_eta *je)
@@
-1382,7
+1386,7
@@
static int fio_client_handle_iolog(struct fio_client *client,
}
out:
}
out:
- if (pdu && pdu != cmd->payload)
+ if (pdu && pdu !=
(void *)
cmd->payload)
free(pdu);
if (log_pathname)
free(pdu);
if (log_pathname)
@@
-1662,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);
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)
switch (cmd->opcode) {
case FIO_NET_CMD_QUIT:
if (ops->quit)
@@
-1685,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));
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);
dprint(FD_NET, "client: received steadystate ring buffers\n");
size = le64_to_cpu(p->ts.ss_dur);
@@
-1864,10
+1870,12
@@
static void request_client_etas(struct client_ops *ops)
static int handle_cmd_timeout(struct fio_client *client,
struct fio_net_cmd_reply *reply)
{
static int handle_cmd_timeout(struct fio_client *client,
struct fio_net_cmd_reply *reply)
{
+ uint16_t reply_opcode = reply->opcode;
+
flist_del(&reply->list);
free(reply);
flist_del(&reply->list);
free(reply);
- if (reply
->
opcode != FIO_NET_CMD_SEND_ETA)
+ if (reply
_
opcode != FIO_NET_CMD_SEND_ETA)
return 1;
log_info("client <%s>: timeout on SEND_ETA\n", client->hostname);
return 1;
log_info("client <%s>: timeout on SEND_ETA\n", client->hostname);
@@
-1934,7
+1942,10
@@
static int fio_check_clients_timed_out(void)
else
log_err("fio: client %s timed out\n", client->hostname);
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;
}
remove_client(client);
ret = 1;
}