added fio log parser tool.
[fio.git] / iolog.c
diff --git a/iolog.c b/iolog.c
index e4a414f935f873be45134e6d9f9c127ca7d9e579..94d3f3c1bcc0a5659f971740ae387c1bac46d339 100644 (file)
--- a/iolog.c
+++ b/iolog.c
@@ -576,7 +576,7 @@ void setup_log(struct io_log **log, struct log_params *p,
 
        l = calloc(1, sizeof(*l));
        l->nr_samples = 0;
-       l->max_samples = 1024;
+       l->max_samples = DEF_LOG_ENTRIES;
        l->log_type = p->log_type;
        l->log_offset = p->log_offset;
        l->log_gz = p->log_gz;
@@ -1022,7 +1022,7 @@ static int gz_work(struct iolog_flush_data *data)
        ret = deflateInit(&stream, Z_DEFAULT_COMPRESSION);
        if (ret != Z_OK) {
                log_err("fio: failed to init gz stream\n");
-               return 0;
+               goto err;
        }
 
        seq = ++data->log->chunk_seq;
@@ -1165,7 +1165,7 @@ int iolog_flush(struct io_log *log, int wait)
        data->nr_samples = log->nr_samples;
 
        log->nr_samples = 0;
-       log->max_samples = 128;
+       log->max_samples = DEF_LOG_ENTRIES;
        log->log = malloc(log->max_samples * log_entry_sz(log));
 
        if (!wait)