dovecot-2.0: lib-index: fsync change broke .newlock dotlock for ...

dovecot at dovecot.org dovecot at dovecot.org
Fri Jun 25 19:02:21 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/9127a9f4a020
changeset: 11635:9127a9f4a020
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jun 25 17:02:18 2010 +0100
description:
lib-index: fsync change broke .newlock dotlock for transaction log.

diffstat:

 src/lib-index/mail-transaction-log.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r 7f19062f58fd -r 9127a9f4a020 src/lib-index/mail-transaction-log.c
--- a/src/lib-index/mail-transaction-log.c	Fri Jun 25 16:21:49 2010 +0100
+++ b/src/lib-index/mail-transaction-log.c	Fri Jun 25 17:02:18 2010 +0100
@@ -80,12 +80,16 @@
 				    MAIL_TRANSACTION_LOG_SUFFIX, NULL);
 	log->filepath2 = i_strconcat(log->filepath, ".2", NULL);
 
+	/* these settings aren't available at alloc() time, so we need to
+	   set them here: */
 	log->nfs_flush =
 		(log->index->flags & MAIL_INDEX_OPEN_FLAG_NFS_FLUSH) != 0;
 	log->dotlock_settings.use_excl_lock =
+		log->dotlock_settings.nfs_flush =
 		(log->index->flags & MAIL_INDEX_OPEN_FLAG_DOTLOCK_USE_EXCL) != 0;
-	log->dotlock_settings.nfs_flush = log->nfs_flush;
-	log->new_dotlock_settings = log->dotlock_settings;
+	log->dotlock_settings.nfs_flush =
+		log->new_dotlock_settings.nfs_flush =
+		log->nfs_flush;
 
 	if (log->open_file != NULL)
 		mail_transaction_log_file_free(&log->open_file);


More information about the dovecot-cvs mailing list