Fix fio silently dropping log entries when using log_compression
authoraggieNick02 <nick@pcpartpicker.com>
Thu, 1 Sep 2022 17:26:45 +0000 (12:26 -0500)
committeraggieNick02 <nick@pcpartpicker.com>
Thu, 1 Sep 2022 17:40:35 +0000 (12:40 -0500)
commit03900b0bf8af625bb43b10f0627b3c5947c3ff79
tree21ca489b0feb08097645de1db39c828d8c158435
parente453f369ecf4db4913ef6916603037f2d7141035
Fix fio silently dropping log entries when using log_compression

This fixes issue 1457: https://github.com/axboe/fio/issues/1457

The fix is to just add a workqueue_flush to iolog_flush so that any log
chunks being compressed in the workqueue get flushed before we compress
and write the entries in the current active logs. Without this, log
entries in the workqueue can be omitted or be written out of order.

We also add a new test that ensures the log file has the right number of
entries in the correct order when using log_compression, both with and
without the store_log_compressed option.

There is still some cleanup to do with respect to the current
documentation and comments for the log_compression option, as it does
not affect the size of chunks, but instead is effectively a boolean that
controls whether chunks are compressed and removed. I'll leave that for
a separate PR.

Signed-off-by: Nick Neumann <nick@pcpartpicker.com>
iolog.c
t/log_compression.py [new file with mode: 0755]
t/run-fio-tests.py