From: Jens Axboe Date: Thu, 19 May 2016 20:36:21 +0000 (-0600) Subject: iolog: sum last chunk length to total X-Git-Tag: fio-2.10~9 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=50f940f14c863206d1a760a21c55dfd33d6a9837;p=fio.git iolog: sum last chunk length to total Signed-off-by: Jens Axboe --- diff --git a/iolog.c b/iolog.c index 75958f2e..a426a6a5 100644 --- a/iolog.c +++ b/iolog.c @@ -745,7 +745,8 @@ static void finish_chunk(z_stream *stream, FILE *f, ret = inflateEnd(stream); if (ret != Z_OK) - log_err("fio: failed to end log inflation (%d)\n", ret); + log_err("fio: failed to end log inflation seq %d (%d)\n", + iter->seq, ret); flush_samples(f, iter->buf, iter->buf_used); free(iter->buf); @@ -1069,9 +1070,10 @@ static int gz_work(struct iolog_flush_data *data) stream.avail_out = GZ_CHUNK - c->len; ret = deflate(&stream, Z_FINISH); - if (ret == Z_STREAM_END) + if (ret == Z_STREAM_END) { c->len = GZ_CHUNK - stream.avail_out; - else { + total += c->len; + } else { do { c = get_new_chunk(seq); stream.avail_out = GZ_CHUNK;