From: Jens Axboe Date: Thu, 27 Sep 2018 18:26:47 +0000 (-0600) Subject: server: be locally vocal about communication issues X-Git-Tag: fio-3.11~16 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=b2ef2748a7c882fbac814f10d0f36630ac16ff89;p=fio.git server: be locally vocal about communication issues If we fail the CRC check or if we have a mismatched client/server, then we can't reliably transmit anything across the wire. For that case, in addition to attempting to relay this information across the wire, also print a local warning. This fixes a case where we silently exit when the client/server versions aren't properly matched. Fixes: https://github.com/axboe/fio/issues/620 Signed-off-by: Jens Axboe --- diff --git a/server.c b/server.c index b966c66c..1c075019 100644 --- a/server.c +++ b/server.c @@ -296,6 +296,8 @@ static int verify_convert_cmd(struct fio_net_cmd *cmd) if (crc != cmd->cmd_crc16) { log_err("fio: server bad crc on command (got %x, wanted %x)\n", cmd->cmd_crc16, crc); + fprintf(f_err, "fio: server bad crc on command (got %x, wanted %x)\n", + cmd->cmd_crc16, crc); return 1; } @@ -310,6 +312,8 @@ static int verify_convert_cmd(struct fio_net_cmd *cmd) break; default: log_err("fio: bad server cmd version %d\n", cmd->version); + fprintf(f_err, "fio: client/server version mismatch (%d != %d)\n", + cmd->version, FIO_SERVER_VER); return 1; }