static void remove_client(struct fio_client *client)
{
+ dprint(FD_NET, "removed client <%s>\n", client->hostname);
flist_del(&client->list);
nr_clients--;
free(client->hostname);
{
struct fio_client *client;
+ dprint(FD_NET, "added client <%s>\n", hostname);
client = malloc(sizeof(*client));
memset(client, 0, sizeof(*client));
client->hostname = strdup(hostname);
{
int fd;
+ dprint(FD_NET, "connect to host %s\n", client->hostname);
+
memset(&client->addr, 0, sizeof(client->addr));
client->addr.sin_family = AF_INET;
client->addr.sin_port = htons(fio_net_port);
fd = socket(AF_INET, SOCK_STREAM, 0);
if (fd < 0) {
log_err("fio: socket: %s\n", strerror(errno));
- free(client);
return 1;
}
if (connect(fd, (struct sockaddr *) &client->addr, sizeof(client->addr)) < 0) {
log_err("fio: connect: %s\n", strerror(errno));
- free(client);
return 1;
}
off_t len;
int fd, ret;
+ dprint(FD_NET, "send ini %s to %s\n", filename, client->hostname);
+
fd = open(filename, O_RDONLY);
if (fd < 0) {
log_err("fio: job file open: %s\n", strerror(errno));
struct fio_net_cmd *cmd;
while ((cmd = fio_net_cmd_read(client->fd)) != NULL) {
+ dprint(FD_NET, "%s: got cmd op %d\n", client->hostname,
+ cmd->opcode);
+
if (cmd->opcode == FIO_NET_CMD_ACK) {
free(cmd);
continue;
}
free(pfds);
-
return 0;
}