server: process STOP/QUIT commands out-of-line
authorJens Axboe <axboe@kernel.dk>
Wed, 21 Mar 2018 21:48:17 +0000 (15:48 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 21 Mar 2018 21:48:17 +0000 (15:48 -0600)
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 <jeff.furlong@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
server.c

index 65d4484edae5b82fa01db3237ee7ed4ab7391a68..6064d8172a3babcf72d7a497303e9caa90bc93f8 100644 (file)
--- 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)