This can happen if we time out a reply, but the the reply comes
in a bit later. For that case, we already decremented the ETA
count, so we should just ignore the late reply.
Signed-off-by: Jens Axboe <axboe@fb.com>
strcpy((char *) dst->run_str, (char *) je->run_str);
}
strcpy((char *) dst->run_str, (char *) je->run_str);
}
-static void remove_reply_cmd(struct fio_client *client, struct fio_net_cmd *cmd)
+static bool remove_reply_cmd(struct fio_client *client, struct fio_net_cmd *cmd)
{
struct fio_net_cmd_reply *reply = NULL;
struct flist_head *entry;
{
struct fio_net_cmd_reply *reply = NULL;
struct flist_head *entry;
if (!reply) {
log_err("fio: client: unable to find matching tag (%llx)\n", (unsigned long long) cmd->tag);
if (!reply) {
log_err("fio: client: unable to find matching tag (%llx)\n", (unsigned long long) cmd->tag);
}
flist_del(&reply->list);
cmd->tag = reply->saved_tag;
free(reply);
}
flist_del(&reply->list);
cmd->tag = reply->saved_tag;
free(reply);
}
int fio_client_wait_for_reply(struct fio_client *client, uint64_t tag)
}
int fio_client_wait_for_reply(struct fio_client *client, uint64_t tag)
case FIO_NET_CMD_ETA: {
struct jobs_eta *je = (struct jobs_eta *) cmd->payload;
case FIO_NET_CMD_ETA: {
struct jobs_eta *je = (struct jobs_eta *) cmd->payload;
- remove_reply_cmd(client, cmd);
+ if (!remove_reply_cmd(client, cmd))
+ break;
convert_jobs_eta(je);
handle_eta(client, cmd);
break;
convert_jobs_eta(je);
handle_eta(client, cmd);
break;