#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <limits.h>
#include <errno.h>
#include <fcntl.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/wait.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include "server.h"
#include "flist.h"
#include "hash.h"
-#include "verify.h"
+#include "verify-state.h"
static void handle_du(struct fio_client *client, struct fio_net_cmd *cmd);
static void handle_ts(struct fio_client *client, struct fio_net_cmd *cmd);
}
for (i = 0; i < FIO_IO_U_MAP_NR; i++) {
- dst->io_u_map[i] = le32_to_cpu(src->io_u_map[i]);
- dst->io_u_submit[i] = le32_to_cpu(src->io_u_submit[i]);
- dst->io_u_complete[i] = le32_to_cpu(src->io_u_complete[i]);
+ dst->io_u_map[i] = le64_to_cpu(src->io_u_map[i]);
+ dst->io_u_submit[i] = le64_to_cpu(src->io_u_submit[i]);
+ dst->io_u_complete[i] = le64_to_cpu(src->io_u_complete[i]);
}
for (i = 0; i < FIO_IO_U_LAT_N_NR; i++)
- dst->io_u_lat_n[i] = le32_to_cpu(src->io_u_lat_n[i]);
+ dst->io_u_lat_n[i] = le64_to_cpu(src->io_u_lat_n[i]);
for (i = 0; i < FIO_IO_U_LAT_U_NR; i++)
- dst->io_u_lat_u[i] = le32_to_cpu(src->io_u_lat_u[i]);
+ dst->io_u_lat_u[i] = le64_to_cpu(src->io_u_lat_u[i]);
for (i = 0; i < FIO_IO_U_LAT_M_NR; i++)
- dst->io_u_lat_m[i] = le32_to_cpu(src->io_u_lat_m[i]);
+ dst->io_u_lat_m[i] = le64_to_cpu(src->io_u_lat_m[i]);
for (i = 0; i < DDIR_RWDIR_CNT; i++)
for (j = 0; j < FIO_IO_U_PLAT_NR; j++)
- dst->io_u_plat[i][j] = le32_to_cpu(src->io_u_plat[i][j]);
+ dst->io_u_plat[i][j] = le64_to_cpu(src->io_u_plat[i][j]);
for (i = 0; i < DDIR_RWDIR_CNT; i++) {
dst->total_io_u[i] = le64_to_cpu(src->total_io_u[i]);
client_ts.thread_number = p->ts.thread_number;
client_ts.groupid = p->ts.groupid;
client_ts.unified_rw_rep = p->ts.unified_rw_rep;
+ client_ts.sig_figs = p->ts.sig_figs;
if (++sum_stat_nr == sum_stat_clients) {
strcpy(client_ts.name, "All clients");
int log_offset;
uint64_t i, j, nr_samples;
struct io_u_plat_entry *entry;
- unsigned int *io_u_plat;
+ uint64_t *io_u_plat;
int stride = 1 << hist_coarseness;
fprintf(f, "%lu, %u, %u, ", (unsigned long) s->time,
io_sample_ddir(s), s->bs);
for (j = 0; j < FIO_IO_U_PLAT_NR - stride; j += stride) {
- fprintf(f, "%lu, ", hist_sum(j, stride, io_u_plat, NULL));
+ fprintf(f, "%llu, ", (unsigned long long)hist_sum(j, stride, io_u_plat, NULL));
}
- fprintf(f, "%lu\n", (unsigned long)
+ fprintf(f, "%llu\n", (unsigned long long)
hist_sum(FIO_IO_U_PLAT_NR - stride, stride, io_u_plat, NULL));
}
sprintf(log_pathname, "%s.%s", pdu->name, client->hostname);
if (store_direct) {
- ssize_t ret;
+ ssize_t wrote;
size_t sz;
int fd;
}
sz = cmd->pdu_len - sizeof(*pdu);
- ret = write(fd, pdu->samples, sz);
+ wrote = write(fd, pdu->samples, sz);
close(fd);
- if (ret != sz) {
+ if (wrote != sz) {
log_err("fio: short write on compressed log\n");
ret = 1;
goto out;
struct client_eta *eta;
int skipped = 0;
+ if (eta_print == FIO_ETA_NEVER)
+ return;
+
dprint(FD_NET, "client: request eta (%d)\n", nr_clients);
eta = calloc(1, sizeof(*eta) + __THREAD_RUNSTR_SZ(REAL_MAX_JOBS));
int ret = 0;
flist_for_each_safe(entry, tmp, &client->cmd_list) {
+ unsigned int op;
+
reply = flist_entry(entry, struct fio_net_cmd_reply, list);
if (mtime_since(&reply->ts, now) < FIO_NET_CLIENT_TIMEOUT)
continue;
+ op = reply->opcode;
if (!handle_cmd_timeout(client, reply))
continue;
log_err("fio: client %s, timeout on cmd %s\n", client->hostname,
- fio_server_op(reply->opcode));
+ fio_server_op(op));
ret = 1;
}
int timeout;
fio_gettime(&ts, NULL);
- if (mtime_since(&eta_ts, &ts) >= 900) {
+ if (eta_time_within_slack(mtime_since(&eta_ts, &ts))) {
request_client_etas(ops);
memcpy(&eta_ts, &ts, sizeof(ts));