[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-keywords.c, 1.6.2.3, 1.6.2.4 maildir-uidlist.c, 1.51.2.2, 1.51.2.3

tss at dovecot.org tss at dovecot.org
Thu Dec 28 16:51:09 UTC 2006


Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv1190/lib-storage/index/maildir

Modified Files:
      Tag: branch_1_0
	maildir-keywords.c maildir-uidlist.c 
Log Message:
More dotlock_use_excl uses.



Index: maildir-keywords.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-keywords.c,v
retrieving revision 1.6.2.3
retrieving revision 1.6.2.4
diff -u -d -r1.6.2.3 -r1.6.2.4
--- maildir-keywords.c	3 Dec 2006 14:35:05 -0000	1.6.2.3
+++ maildir-keywords.c	28 Dec 2006 16:51:06 -0000	1.6.2.4
@@ -21,6 +21,9 @@
 #include <sys/stat.h>
 #include <utime.h>
 
+/* how many seconds to wait before overriding dovecot-keywords.lock */
+#define KEYWORDS_LOCK_STALE_TIMEOUT (60*2)
+
 struct maildir_keywords {
 	struct maildir_mailbox *mbox;
 	char *path;
@@ -58,6 +61,14 @@
 		     const char *, MAILDIR_MAX_KEYWORDS);
 	mk->hash = hash_create(default_pool, mk->pool, 0,
 			       strcase_hash, (hash_cmp_callback_t *)strcasecmp);
+
+	mk->dotlock_settings.use_excl_lock =
+		(STORAGE(mbox->storage)->flags &
+		 MAIL_STORAGE_FLAG_DOTLOCK_USE_EXCL) != 0;
+	mk->dotlock_settings.timeout = KEYWORDS_LOCK_STALE_TIMEOUT + 2;
+	mk->dotlock_settings.stale_timeout = KEYWORDS_LOCK_STALE_TIMEOUT;
+	mk->dotlock_settings.temp_prefix =
+		INDEX_STORAGE(mbox->storage)->temp_prefix;
 	return mk;
 }
 

Index: maildir-uidlist.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-uidlist.c,v
retrieving revision 1.51.2.2
retrieving revision 1.51.2.3
diff -u -d -r1.51.2.2 -r1.51.2.3
--- maildir-uidlist.c	22 Dec 2006 14:20:31 -0000	1.51.2.2
+++ maildir-uidlist.c	28 Dec 2006 16:51:06 -0000	1.51.2.3
@@ -172,6 +172,9 @@
 				     maildir_hash, maildir_cmp);
 	uidlist->next_uid = 1;
 
+	uidlist->dotlock_settings.use_excl_lock =
+		(STORAGE(mbox->storage)->flags &
+		 MAIL_STORAGE_FLAG_DOTLOCK_USE_EXCL) != 0;
 	uidlist->dotlock_settings.timeout = UIDLIST_LOCK_STALE_TIMEOUT + 2;
 	uidlist->dotlock_settings.stale_timeout = UIDLIST_LOCK_STALE_TIMEOUT;
 	uidlist->dotlock_settings.temp_prefix =



More information about the dovecot-cvs mailing list