From: Jens Axboe Date: Thu, 5 May 2016 16:54:03 +0000 (-0600) Subject: iolog: add define for default number of log entries X-Git-Tag: fio-2.10~50 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=6d37f67ffe590b2cbd9ea9f5b3105abaff2e5305 iolog: add define for default number of log entries We use two different ones, depending on gz or not... Signed-off-by: Jens Axboe --- diff --git a/iolog.c b/iolog.c index 7d19fbfa..94d3f3c1 100644 --- 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; @@ -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) diff --git a/iolog.h b/iolog.h index 297daf58..74f21706 100644 --- a/iolog.h +++ b/iolog.h @@ -41,6 +41,8 @@ enum { IO_LOG_TYPE_IOPS, }; +#define DEF_LOG_ENTRIES 1024 + /* * Dynamically growing data sample log */