dovecot: If mmap_disable=yes, don't reopen index file unless we ...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Jan 11 04:49:57 EET 2008
details: http://hg.dovecot.org/dovecot/rev/81d7093fb892
changeset: 7143:81d7093fb892
user: Timo Sirainen <tss at iki.fi>
date: Fri Jan 11 04:41:30 2008 +0200
description:
If mmap_disable=yes, don't reopen index file unless we really have to,
because it causes cache sync to get lost.
diffstat:
1 file changed, 9 insertions(+), 5 deletions(-)
src/lib-index/mail-index-sync-update.c | 14 +++++++++-----
diffs (26 lines):
diff -r 58cb2c6f90c7 -r 81d7093fb892 src/lib-index/mail-index-sync-update.c
--- a/src/lib-index/mail-index-sync-update.c Thu Jan 10 14:15:49 2008 +0200
+++ b/src/lib-index/mail-index-sync-update.c Fri Jan 11 04:41:30 2008 +0200
@@ -687,13 +687,17 @@ int mail_index_sync_map(struct mail_inde
i_assert(index->map == map || type == MAIL_INDEX_SYNC_HANDLER_VIEW);
- if (!force) {
+ if (index->log->head == NULL) {
+ i_assert(!force);
+ return 0;
+ }
+
+ if (!force && !index->mmap_disable) {
/* see if we'd prefer to reopen the index file instead of
- syncing the current map from the transaction log */
+ syncing the current map from the transaction log.
+ don't check this if mmap is disabled, because reopening
+ index causes sync to get lost. */
uoff_t log_size, index_size;
-
- if (index->log->head == NULL)
- return 0;
if (index->fd == -1 &&
index->log->head->hdr.prev_file_seq != 0) {
More information about the dovecot-cvs
mailing list