server: be locally vocal about communication issues
authorJens Axboe <axboe@kernel.dk>
Thu, 27 Sep 2018 18:26:47 +0000 (12:26 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 27 Sep 2018 18:26:47 +0000 (12:26 -0600)
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 <axboe@kernel.dk>
server.c

index b966c66cbfe342d476b8054e2665932004ed41ba..1c0750194be853af274e7257923210167edd1e31 100644 (file)
--- 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;
        }