Lines Matching defs:cmd
28 static void handle_du(struct fio_client *client, struct fio_net_cmd *cmd);
29 static void handle_ts(struct fio_client *client, struct fio_net_cmd *cmd);
30 static void handle_gs(struct fio_client *client, struct fio_net_cmd *cmd);
31 static void handle_probe(struct fio_client *client, struct fio_net_cmd *cmd);
32 static void handle_text(struct fio_client *client, struct fio_net_cmd *cmd);
33 static void handle_stop(struct fio_client *client, struct fio_net_cmd *cmd);
34 static void handle_start(struct fio_client *client, struct fio_net_cmd *cmd);
227 dprint(FD_NET, "client: add cmd %d: %s\n", index, opt);
924 static void handle_ts(struct fio_client *client, struct fio_net_cmd *cmd)
926 struct cmd_ts_pdu *p = (struct cmd_ts_pdu *) cmd->payload;
957 static void handle_gs(struct fio_client *client, struct fio_net_cmd *cmd)
959 struct group_run_stats *gs = (struct group_run_stats *) cmd->payload;
964 static void handle_text(struct fio_client *client, struct fio_net_cmd *cmd)
966 struct cmd_text_pdu *pdu = (struct cmd_text_pdu *) cmd->payload;
1013 static void handle_du(struct fio_client *client, struct fio_net_cmd *cmd)
1015 struct cmd_du_pdu *du = (struct cmd_du_pdu *) cmd->payload;
1098 static void remove_reply_cmd(struct fio_client *client, struct fio_net_cmd *cmd)
1106 if (cmd->tag == (uintptr_t) reply)
1113 log_err("fio: client: unable to find matching tag (%llx)\n", (unsigned long long) cmd->tag);
1118 cmd->tag = reply->saved_tag;
1146 static void handle_eta(struct fio_client *client, struct fio_net_cmd *cmd)
1148 struct jobs_eta *je = (struct jobs_eta *) cmd->payload;
1149 struct client_eta *eta = (struct client_eta *) (uintptr_t) cmd->tag;
1165 static void handle_probe(struct fio_client *client, struct fio_net_cmd *cmd)
1167 struct cmd_probe_reply_pdu *probe = (struct cmd_probe_reply_pdu *) cmd->payload;
1190 static void handle_start(struct fio_client *client, struct fio_net_cmd *cmd)
1192 struct cmd_start_pdu *pdu = (struct cmd_start_pdu *) cmd->payload;
1201 static void handle_stop(struct fio_client *client, struct fio_net_cmd *cmd)
1207 static void convert_stop(struct fio_net_cmd *cmd)
1209 struct cmd_end_pdu *pdu = (struct cmd_end_pdu *) cmd->payload;
1214 static void convert_text(struct fio_net_cmd *cmd)
1216 struct cmd_text_pdu *pdu = (struct cmd_text_pdu *) cmd->payload;
1224 static struct cmd_iolog_pdu *convert_iolog_gz(struct fio_net_cmd *cmd,
1256 stream.avail_in = cmd->pdu_len - sizeof(*pdu);
1294 static struct cmd_iolog_pdu *convert_iolog(struct fio_net_cmd *cmd)
1296 struct cmd_iolog_pdu *pdu = (struct cmd_iolog_pdu *) cmd->payload;
1310 ret = convert_iolog_gz(cmd, pdu);
1388 struct fio_net_cmd *cmd;
1392 cmd = fio_net_recv_cmd(client->fd);
1393 if (!cmd)
1396 dprint(FD_NET, "client: got cmd op %s from %s (pdu=%u)\n",
1397 fio_server_op(cmd->opcode), client->hostname, cmd->pdu_len);
1399 switch (cmd->opcode) {
1402 ops->quit(client, cmd);
1406 convert_text(cmd);
1407 ops->text(client, cmd);
1410 struct cmd_du_pdu *du = (struct cmd_du_pdu *) cmd->payload;
1415 ops->disk_util(client, cmd);
1419 struct cmd_ts_pdu *p = (struct cmd_ts_pdu *) cmd->payload;
1424 ops->thread_status(client, cmd);
1428 struct group_run_stats *gs = (struct group_run_stats *) cmd->payload;
1432 ops->group_stats(client, cmd);
1436 struct jobs_eta *je = (struct jobs_eta *) cmd->payload;
1438 remove_reply_cmd(client, cmd);
1440 handle_eta(client, cmd);
1444 remove_reply_cmd(client, cmd);
1445 ops->probe(client, cmd);
1450 ops->job_start(client, cmd);
1453 struct cmd_start_pdu *pdu = (struct cmd_start_pdu *) cmd->payload;
1456 ops->start(client, cmd);
1460 struct cmd_end_pdu *pdu = (struct cmd_end_pdu *) cmd->payload;
1462 convert_stop(cmd);
1466 ops->stop(client, cmd);
1470 struct cmd_add_job_pdu *pdu = (struct cmd_add_job_pdu *) cmd->payload;
1476 ops->add_job(client, cmd);
1483 pdu = convert_iolog(cmd);
1488 ops->update_job(client, cmd);
1489 remove_reply_cmd(client, cmd);
1492 struct all_io_list *pdu = (struct all_io_list *) cmd->payload;
1500 struct cmd_sendfile *pdu = (struct cmd_sendfile *) cmd->payload;
1501 send_file(client, pdu, cmd->tag);
1505 log_err("fio: unknown client op: %s\n", fio_server_op(cmd->opcode));
1509 free(cmd);
1513 int fio_clients_send_trigger(const char *cmd)
1519 dprint(FD_NET, "client: send vtrigger: %s\n", cmd);
1521 if (!cmd)
1524 slen = strlen(cmd);
1534 memcpy(pdu->cmd, cmd, slen);
1591 log_err("fio: client %s, timeout on cmd %s\n", client->hostname,