iolog: ensure proper flushing of compressed logs
authorJens Axboe <axboe@kernel.dk>
Thu, 22 Jun 2017 23:15:27 +0000 (17:15 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 22 Jun 2017 23:15:27 +0000 (17:15 -0600)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
iolog.h

diff --git a/iolog.h b/iolog.h
index 6274aef..d157fa2 100644 (file)
--- a/iolog.h
+++ b/iolog.h
@@ -264,7 +264,7 @@ struct log_params {
 
 static inline bool per_unit_log(struct io_log *log)
 {
-       return log && !log->avg_msec;
+       return log && (!log->avg_msec || log->log_gz || log->log_gz_store);
 }
 
 static inline bool inline_log(struct io_log *log)