[dovecot-cvs] dovecot/src/lib-index mail-cache.c, 1.80.2.5, 1.80.2.6 mail-index-private.h, 1.69.2.2, 1.69.2.3 mail-index.c, 1.230.2.9, 1.230.2.10 mail-index.h, 1.158.2.3, 1.158.2.4 mail-transaction-log.c, 1.111.2.4, 1.111.2.5

tss at dovecot.org tss at dovecot.org
Thu Dec 28 16:27:44 UTC 2006


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv32286/src/lib-index

Modified Files:
      Tag: branch_1_0
	mail-cache.c mail-index-private.h mail-index.c mail-index.h 
	mail-transaction-log.c 
Log Message:
Added dotlock_use_excl setting.


Index: mail-cache.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-cache.c,v
retrieving revision 1.80.2.5
retrieving revision 1.80.2.6
diff -u -d -r1.80.2.5 -r1.80.2.6
--- mail-cache.c	13 Oct 2006 15:32:31 -0000	1.80.2.5
+++ mail-cache.c	28 Dec 2006 16:27:41 -0000	1.80.2.6
@@ -298,6 +298,7 @@
 		hash_create(default_pool, cache->field_pool, 0,
 			    strcase_hash, (hash_cmp_callback_t *)strcasecmp);
 
+	cache->dotlock_settings.use_excl_lock = index->use_excl_dotlocks;
 	cache->dotlock_settings.timeout = MAIL_CACHE_LOCK_TIMEOUT;
 	cache->dotlock_settings.stale_timeout = MAIL_CACHE_LOCK_CHANGE_TIMEOUT;
 

Index: mail-index-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-private.h,v
retrieving revision 1.69.2.2
retrieving revision 1.69.2.3
diff -u -d -r1.69.2.2 -r1.69.2.3
--- mail-index-private.h	13 Oct 2006 18:42:48 -0000	1.69.2.2
+++ mail-index-private.h	28 Dec 2006 16:27:41 -0000	1.69.2.3
@@ -174,6 +174,7 @@
 	unsigned int log_locked:1;
 	unsigned int mmap_disable:1;
 	unsigned int mmap_no_write:1;
+	unsigned int use_excl_dotlocks:1;
 	unsigned int readonly:1;
 	unsigned int fsck:1;
 	unsigned int sync_update:1;

Index: mail-index.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.230.2.9
retrieving revision 1.230.2.10
diff -u -d -r1.230.2.9 -r1.230.2.10
--- mail-index.c	12 Nov 2006 18:02:14 -0000	1.230.2.9
+++ mail-index.c	28 Dec 2006 16:27:41 -0000	1.230.2.10
@@ -1565,6 +1565,8 @@
 			(flags & MAIL_INDEX_OPEN_FLAG_MMAP_DISABLE) != 0;
 		index->mmap_no_write =
 			(flags & MAIL_INDEX_OPEN_FLAG_MMAP_NO_WRITE) != 0;
+		index->use_excl_dotlocks =
+			(flags & MAIL_INDEX_OPEN_FLAG_DOTLOCK_USE_EXCL) != 0;
 		index->lock_method = lock_method;
 
 		/* don't even bother to handle dotlocking without mmap being

Index: mail-index.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index.h,v
retrieving revision 1.158.2.3
retrieving revision 1.158.2.4
diff -u -d -r1.158.2.3 -r1.158.2.4
--- mail-index.h	12 Nov 2006 19:52:29 -0000	1.158.2.3
+++ mail-index.h	28 Dec 2006 16:27:42 -0000	1.158.2.4
@@ -16,7 +16,9 @@
 	/* Don't try to write() to mmap()ed index files. Required for the few
 	   OSes that don't have unified buffer cache
 	   (currently OpenBSD <= 3.5) */
-	MAIL_INDEX_OPEN_FLAG_MMAP_NO_WRITE	= 0x08
+	MAIL_INDEX_OPEN_FLAG_MMAP_NO_WRITE	= 0x08,
+	/* Rely on O_EXCL when creating dotlocks */
+	MAIL_INDEX_OPEN_FLAG_DOTLOCK_USE_EXCL	= 0x10
 };
 
 enum mail_index_lock_method {

Index: mail-transaction-log.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-transaction-log.c,v
retrieving revision 1.111.2.4
retrieving revision 1.111.2.5
diff -u -d -r1.111.2.4 -r1.111.2.5
--- mail-transaction-log.c	18 Nov 2006 21:01:08 -0000	1.111.2.4
+++ mail-transaction-log.c	28 Dec 2006 16:27:42 -0000	1.111.2.5
@@ -229,6 +229,7 @@
 	log = i_new(struct mail_transaction_log, 1);
 	log->index = index;
 
+	log->dotlock_settings.use_excl_lock = index->use_excl_dotlocks;
 	log->dotlock_settings.timeout = LOG_DOTLOCK_TIMEOUT;
 	log->dotlock_settings.stale_timeout = LOG_DOTLOCK_STALE_TIMEOUT;
 



More information about the dovecot-cvs mailing list