Add support for runtime log compression

If log_compression=64M is specified, fio will "bite" off chunks of
the IO logs and runtime compress them with zlib. This can greatly
reduce the amount of memory required to do iops/bw/lat logging of
a run, at the cost of using some background CPU for the compression.

Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/options.c b/options.c
index 6d326d4..75c9bf5 100644
--- a/options.c
+++ b/options.c
@@ -3104,6 +3104,19 @@
 		.category = FIO_OPT_C_LOG,
 		.group	= FIO_OPT_G_INVALID,
 	},
+#ifdef CONFIG_ZLIB
+	{
+		.name	= "log_compression",
+		.lname	= "Log compression",
+		.type	= FIO_OPT_INT,
+		.off1	= td_var_offset(log_gz),
+		.help	= "Log in compressed chunks of this size",
+		.minval	= 32 * 1024 * 1024ULL,
+		.maxval	= 512 * 1024 * 1024ULL,
+		.category = FIO_OPT_C_LOG,
+		.group	= FIO_OPT_G_INVALID,
+	},
+#endif
 	{
 		.name	= "bwavgtime",
 		.lname	= "Bandwidth average time",