summaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-09-27 12:26:47 -0600
committerJens Axboe <axboe@kernel.dk>2018-09-27 12:26:47 -0600
commitb2ef2748a7c882fbac814f10d0f36630ac16ff89 (patch)
treeea7b8ed90ae5fc6414a5c8a53eaa50c0d8effee2 /server.c
parent480885500d2d6b29a4d0c822ceaf37d5a6eb3abd (diff)
downloadfio-b2ef2748a7c882fbac814f10d0f36630ac16ff89.tar.gz
fio-b2ef2748a7c882fbac814f10d0f36630ac16ff89.tar.bz2
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 <axboe@kernel.dk>
Diffstat (limited to 'server.c')
-rw-r--r--server.c4
1 files changed, 4 insertions, 0 deletions
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;
}