changeset 4120:c9afd13cf2d5 HEAD

Changed the default lock_method back to fcntl. flock seems to be broken in some systems..
author Timo Sirainen <tss@iki.fi>
date Sun, 02 Apr 2006 12:18:49 +0300
parents 162d643ee89b
children f63ff46276a8
files dovecot-example.conf src/lib-storage/mail-storage.c src/master/master-settings.c
diffstat 3 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/dovecot-example.conf	Sat Apr 01 13:44:10 2006 +0300
+++ b/dovecot-example.conf	Sun Apr 02 12:18:49 2006 +0300
@@ -322,7 +322,7 @@
 # Note that OpenBSD 3.3 and older don't work right with mail_read_mmaped = yes.
 #mail_read_mmaped = no
 
-# Don't use mmap() at all. This is required if you store indexes in remote
+# Don't use mmap() at all. This is required if you store indexes to shared
 # filesystems (NFS or clustered filesystem).
 #mmap_disable = no
 
@@ -333,8 +333,7 @@
 # Locking method for index files. Alternatives are fcntl, flock and dotlock.
 # Dotlocking uses some tricks which may create more disk I/O than other locking
 # methods. NOTE: If you use NFS, remember to change also mmap_disable setting!
-# Solaris doesn't support flock, so Solaris users need to change this to fcntl.
-#lock_method = flock
+#lock_method = fcntl
 
 # By default LIST command returns all entries in maildir beginning with dot.
 # Enabling this option makes Dovecot return only entries which are directories.
--- a/src/lib-storage/mail-storage.c	Sat Apr 01 13:44:10 2006 +0300
+++ b/src/lib-storage/mail-storage.c	Sun Apr 02 12:18:49 2006 +0300
@@ -69,10 +69,10 @@
 		*flags_r |= MAIL_STORAGE_FLAG_SAVE_CRLF;
 
 	str = getenv("LOCK_METHOD");
-	if (str == NULL || strcmp(str, "flock") == 0)
+	if (str == NULL || strcmp(str, "fcntl") == 0)
+		*lock_method_r = MAIL_STORAGE_LOCK_FCNTL;
+	else if (strcmp(str, "flock") == 0)
 		*lock_method_r = MAIL_STORAGE_LOCK_FLOCK;
-	else if (strcmp(str, "fcntl") == 0)
-		*lock_method_r = MAIL_STORAGE_LOCK_FCNTL;
 	else if (strcmp(str, "dotlock") == 0)
 		*lock_method_r = MAIL_STORAGE_LOCK_DOTLOCK;
 	else
--- a/src/master/master-settings.c	Sat Apr 01 13:44:10 2006 +0300
+++ b/src/master/master-settings.c	Sun Apr 02 12:18:49 2006 +0300
@@ -319,7 +319,7 @@
 #else
 	MEMBER(mmap_no_write) FALSE,
 #endif
-	MEMBER(lock_method) "flock",
+	MEMBER(lock_method) "fcntl",
 	MEMBER(maildir_stat_dirs) FALSE,
 	MEMBER(maildir_copy_with_hardlinks) FALSE,
 	MEMBER(mbox_read_locks) "fcntl",