Mercurial > dovecot > core-2.2
diff src/lib-index/mail-index.c @ 22610:bf758ce6ee6d
lib-index: Add mail_index_base_optimization_settings
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Mon, 09 Oct 2017 15:24:45 +0300 |
parents | b7e049f3aa16 |
children | 65ada9976a7f |
line wrap: on
line diff
--- a/src/lib-index/mail-index.c Mon Oct 09 15:15:08 2017 +0300 +++ b/src/lib-index/mail-index.c Mon Oct 09 15:24:45 2017 +0300 @@ -30,6 +30,10 @@ static void mail_index_close_nonopened(struct mail_index *index); static const struct mail_index_optimization_settings default_optimization_set = { + .index = { + .rewrite_min_log_bytes = 8 * 1024, + .rewrite_max_log_bytes = 128 * 1024, + }, .log = { .min_size = 32 * 1024, .max_size = 1024 * 1024, @@ -163,6 +167,13 @@ struct mail_index_optimization_settings *dest = &index->optimization_set; + /* index */ + if (set->index.rewrite_min_log_bytes != 0) + dest->index.rewrite_min_log_bytes = set->index.rewrite_min_log_bytes; + if (set->index.rewrite_max_log_bytes != 0) + dest->index.rewrite_max_log_bytes = set->index.rewrite_max_log_bytes; + + /* log */ if (set->log.min_size != 0) dest->log.min_size = set->log.min_size; if (set->log.max_size != 0)