dovecot-2.2: lib-storage: dovecot.index.pvt* ignored several set...

dovecot at dovecot.org dovecot at dovecot.org
Sun Dec 6 14:10:13 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/00817b01020a
changeset: 19467:00817b01020a
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Dec 06 16:09:55 2015 +0200
description:
lib-storage: dovecot.index.pvt* ignored several settings.
mmap_disable=yes, dotlock_use_excl=yes and nfs_flush_index=yes weren't used.

diffstat:

 src/lib-storage/mail-storage.c |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r 6fda0b88e6fe -r 00817b01020a src/lib-storage/mail-storage.c
--- a/src/lib-storage/mail-storage.c	Sun Dec 06 15:39:53 2015 +0200
+++ b/src/lib-storage/mail-storage.c	Sun Dec 06 16:09:55 2015 +0200
@@ -1174,6 +1174,7 @@
 
 int mailbox_open_index_pvt(struct mailbox *box)
 {
+	enum mail_index_open_flags index_flags;
 	int ret;
 
 	if (box->view_pvt != NULL)
@@ -1183,7 +1184,11 @@
 
 	if ((ret = mailbox_alloc_index_pvt(box)) <= 0)
 		return ret;
-	if (mail_index_open(box->index_pvt, MAIL_INDEX_OPEN_FLAG_CREATE) < 0)
+	index_flags = MAIL_INDEX_OPEN_FLAG_CREATE |
+		mail_storage_settings_to_index_flags(box->storage->set);
+	if ((box->flags & MAILBOX_FLAG_SAVEONLY) != 0)
+		index_flags |= MAIL_INDEX_OPEN_FLAG_SAVEONLY;
+	if (mail_index_open(box->index_pvt, index_flags) < 0)
 		return -1;
 	box->view_pvt = mail_index_view_open(box->index_pvt);
 	return 1;


More information about the dovecot-cvs mailing list