From: Jens Axboe Date: Wed, 21 Mar 2018 21:48:17 +0000 (-0600) Subject: server: process STOP/QUIT commands out-of-line X-Git-Tag: fio-3.6~30 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=b647a293d70949b8c401772936a8000d10eb1bb9;p=fio.git server: process STOP/QUIT commands out-of-line At the end of a job, the stats entries are queued up for out-of-line transmission, but we immediately queue a client STOP+QUIT command right after that. If the command handling loop doesn't wakeup and process the stats commands before we process the STOP+QUIT inline, then we lose the stats output from those commands. The result is that the client won't see the job output from that job, or the "All clients" output. We should impose proper ordering for all commands, but this is a quick fix to ensure that we don't hit the above mentioned but. For other commands we don't care about ordering between inline and out-of-line commands, so it's likely good enough to carry us forward. Reported-by: Jeff Furlong Signed-off-by: Jens Axboe --- diff --git a/server.c b/server.c index 65d4484e..6064d817 100644 --- a/server.c +++ b/server.c @@ -616,7 +616,7 @@ static int fio_net_queue_quit(void) { dprint(FD_NET, "server: sending quit\n"); - return fio_net_queue_cmd(FIO_NET_CMD_QUIT, NULL, 0, NULL, SK_F_SIMPLE | SK_F_INLINE); + return fio_net_queue_cmd(FIO_NET_CMD_QUIT, NULL, 0, NULL, SK_F_SIMPLE); } int fio_net_send_quit(int sk) @@ -636,7 +636,7 @@ static int fio_net_send_ack(struct fio_net_cmd *cmd, int error, int signal) epdu.error = __cpu_to_le32(error); epdu.signal = __cpu_to_le32(signal); - return fio_net_queue_cmd(FIO_NET_CMD_STOP, &epdu, sizeof(epdu), &tag, SK_F_COPY | SK_F_INLINE); + return fio_net_queue_cmd(FIO_NET_CMD_STOP, &epdu, sizeof(epdu), &tag, SK_F_COPY); } static int fio_net_queue_stop(int error, int signal)